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/await-then-blowback-reactive/Widget.svelte

16 lines
248 B

<script>
export let options = [];
export let index = 0;
export let value;
$: {
value = options[index];
}
</script>
<select bind:value={index}>
{#each options as option, i}
<option value={i}>{option}</option>
{/each}
</select>