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/contextual-callback-b/main.svelte

12 lines
242 B

<script>
let available = [1, 2, 3, 4, 5];
let taken = [2, 4];
</script>
<select>
<option value="">please choose</option>
{#each available as a}
<option disabled="{!!taken.find(f => f == a)}" value="{a}">{a}</option>
{/each}
</select>