2019-10-16 17:38:45 +13:00
|
|
|
<script>
|
|
|
|
|
|
|
|
export let value="";
|
2020-01-18 22:00:18 +13:00
|
|
|
export let className = "";
|
2019-10-16 17:38:45 +13:00
|
|
|
export let type = "text";
|
|
|
|
export let options = [];
|
|
|
|
|
|
|
|
export let _bb;
|
|
|
|
|
|
|
|
let actualValue = "";
|
|
|
|
|
|
|
|
const onchange = (ev) => {
|
|
|
|
if(_bb) {
|
2019-10-19 19:24:20 +13:00
|
|
|
_bb.setStateFromBinding(_bb.props.value, ev.target.value);
|
2019-10-16 17:38:45 +13:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<select class={className}
|
|
|
|
value={value}
|
|
|
|
on:change={onchange}>
|
2019-10-31 22:23:55 +13:00
|
|
|
<option></option>
|
2019-10-16 17:38:45 +13:00
|
|
|
{#each options as opt}
|
|
|
|
<option id={opt.id ? opt.id : opt.value}>{opt.value}</option>
|
|
|
|
{/each}
|
|
|
|
</select>
|