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/binding-indirect-computed/main.svelte

22 lines
333 B

<script>
export let letters = [
'a',
'b',
'c'
];
export let selected = {
letter: ''
};
function uppercase() {
return letters.map(x => x.toUpperCase());
}
</script>
<select bind:value={selected.letter}>
{#each uppercase() as letter}
<option value="{letter}">{letter}</option>
{/each}
</select>
{selected.letter}