Completed MD Select
This commit is contained in:
parent
6785198c62
commit
cc2c6764ee
|
@ -28,4 +28,4 @@
|
||||||
$: helperClass = cb.build({ props })
|
$: helperClass = cb.build({ props })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p bind:this={helperText} {id} class={helperClass}>{text}</p>
|
<p bind:this={helperText} {id} class={helperClass} aria-hidden="true">{text}</p>
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
export let required = false
|
export let required = false
|
||||||
export let label = ""
|
export let label = ""
|
||||||
export let helperText = ""
|
export let helperText = ""
|
||||||
|
export let persistent = false
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
_bb.setContext("BBMD:list:props", { singleSelection: true })
|
_bb.setContext("BBMD:list:props", { singleSelection: true })
|
||||||
|
@ -84,4 +85,4 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<HelperText id={_helperId} text={helperText} />
|
<HelperText id={_helperId} text={helperText} {persistent} />
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import "./_style.scss"
|
import "./_style.scss"
|
||||||
|
export { default as HelperText } from "./HelperText.svelte"
|
||||||
export { default as Select } from "./Select.svelte";
|
export { default as Select } from "./Select.svelte";
|
|
@ -150,6 +150,7 @@ export const props = {
|
||||||
_component: "@budibase/materialdesign-components/Select",
|
_component: "@budibase/materialdesign-components/Select",
|
||||||
label: "Choose a Milkshake",
|
label: "Choose a Milkshake",
|
||||||
helperText: "Choose a flavour",
|
helperText: "Choose a flavour",
|
||||||
|
persistent: true,
|
||||||
onSelect: selectedItem => console.log("SELECT ITEM", selectedItem),
|
onSelect: selectedItem => console.log("SELECT ITEM", selectedItem),
|
||||||
_children: [
|
_children: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue