mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
Some fixes
This commit is contained in:
parent
b5ec601dd2
commit
060b53bde0
1 changed files with 2 additions and 3 deletions
|
@ -24,15 +24,14 @@
|
|||
let a = $_selectedValues;
|
||||
const i = a.indexOf(value);
|
||||
if (selected && i === -1) {
|
||||
a = a.concat([value]);
|
||||
a = a.push([value]);
|
||||
} else if (!selected && i > -1) {
|
||||
a = a.splice(i, 1);
|
||||
}
|
||||
return a;
|
||||
return [...a];
|
||||
}
|
||||
|
||||
setContext("SelectableTileGroup", {
|
||||
_light: light,
|
||||
selectedValues: _selectedValues,
|
||||
update: ({ selected, value }) =>
|
||||
_selectedValues.set(newArray(value, selected)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue