mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
try to fix reactivity
This commit is contained in:
parent
cbdf10d253
commit
7373aa30c5
1 changed files with 30 additions and 1 deletions
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
|
||||
<SelectableTileGroup
|
||||
selectedValues="{selectedValues3}"
|
||||
bind:selectedValues="{selectedValues3}"
|
||||
legend="Select the options you require"
|
||||
>
|
||||
{#each selectedValues3_control as item}
|
||||
|
@ -85,3 +85,32 @@
|
|||
Reset selectedValues3
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<h2>#key fix</h2>
|
||||
|
||||
<SelectableTileGroup
|
||||
bind:selectedValues="{selectedValues3}"
|
||||
legend="Select the options you require"
|
||||
>
|
||||
{#key selectedValues3_control}
|
||||
{#each selectedValues3_control as item}
|
||||
<SelectableTile value="{item.value}" selected="{item.selected}">
|
||||
{item.value}
|
||||
</SelectableTile>
|
||||
{/each}
|
||||
{/key}
|
||||
</SelectableTileGroup>
|
||||
|
||||
<div>
|
||||
{selectedValues3.join(', ')}
|
||||
|
||||
<Button
|
||||
on:click="{() => {
|
||||
selectedValues3_control = selectedValues3_control.map((item) => {
|
||||
return { ...item, selected: false };
|
||||
});
|
||||
}}"
|
||||
>
|
||||
Reset selectedValues3
|
||||
</Button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue