You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/select-props/main.html

16 lines
254 B

<script>
export let foo = [ 1, 2 ];
export let log = [];
export function handler(bar) {
log = log.concat(bar);
}
</script>
{#each foo as bar}
<select on:change='{() => handler(bar)}'>
<option>a</option>
<option>b</option>
</select>
{/each}