budibase/packages/standard-components/src/Select.svelte

24 lines
400 B
Svelte

<script>
export let value = ""
export let className = ""
export let _bb
let actualValue = ""
let selectElement
$: selectElement && _bb.attachChildren(selectElement)
const onchange = ev => {
if (_bb) {
_bb.setStateFromBinding(_bb.props.value, ev.target.value)
}
}
</script>
<select
class={className}
{value}
on:change={onchange}
bind:this={selectElement} />