Skip to content

Commit 98fe7fa

Browse files
oncodeManuel Sommerhalder
authored andcommitted
fix(choice): validate on store change (closes #170)
Co-authored-by: Manuel Sommerhalder <hello@oncode.ch>
1 parent 95ece4a commit 98fe7fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Choice.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@
4242
id="{name}-{option.id}"
4343
type="checkbox"
4444
{name}
45+
bind:group={$choice}
4546
on:change={onChange}
4647
on:blur={onBlur}
47-
bind:group={$choice}
4848
value={option.id}
4949
{...$$restProps} />
5050
{:else}
5151
<input
5252
id="{name}-{option.id}"
5353
type="radio"
5454
{name}
55+
bind:group={$choice}
5556
on:change={onChange}
5657
on:blur={onBlur}
57-
bind:group={$choice}
5858
value={option.id}
5959
{...$$restProps} />
6060
{/if}

0 commit comments

Comments
 (0)