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-change-handler/main.html

15 lines
341 B

<select bind:value="selected" on:change="updateLastChangedTo(selected)">
{{#each options as option}}
<option value="{{option.id}}">{{option.id}}</option>
{{/each}}
</select>
<script>
export default {
methods: {
updateLastChangedTo(result) {
this.set({ lastChangedTo: result })
}
}
}
</script>