Created with svelte.technology/repl
Last active
March 25, 2019 07:02
-
-
Save imbolc/e29205d6901d135c8c1bd8c3eec26d67 to your computer and use it in GitHub Desktop.
`bind:group` does not work with nested components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{#each menu as flavour} | |
<Flavour {flavour}/> | |
{/each} | |
<script> | |
import Flavour from "./Flavour.svelte" | |
let menu = [ | |
'Cookies and cream', | |
'Mint choc chip', | |
'Raspberry ripple' | |
]; | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label> | |
<input type=checkbox bind:group={$flavours} value={flavour}> | |
{flavour} | |
</label> | |
<script> | |
import { flavours } from "./stores.js" | |
export let flavour | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"svelte": true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { writable } from 'svelte/store'; | |
export const flavours = writable([]); | |
flavours.subscribe(console.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment