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-input-group-each-6/main.svelte

23 lines
320 B

<script>
const values = ['x', 'y', 'z'];
const list = {
a: [],
b: [],
c: [],
};
</script>
{#each Object.keys(list) as key}
{#each values as value}
<label>
<input
type='checkbox'
bind:group={list[key]}
value={value}
/>
{value}
</label>
{/each}
<p>{list[key].join(', ')}</p>
{/each}