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-if-gh-8.../main.svelte

15 lines
382 B

<script>
export let test = [];
let hidden = false
</script>
<button on:click={() => hidden = !hidden}>
{hidden ? "show" : "hide"} b
</button>
<label>a <input type="checkbox" bind:group={test} value="a" /></label>
{#if !hidden}
<label>b <input type="checkbox" bind:group={test} value="b" /></label>
{/if}
<label>c <input value="just here, so b is not the last input" /></label>