mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
update fix required for both branches of the if statement! - may as well have kept my original :) git push ispyinternet
This commit is contained in:
parent
c37d7b3760
commit
b83d6ad930
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
|||
selectedValues: _selectedValues,
|
||||
update: ({ selected, value }) =>
|
||||
_selectedValues.update((_) => {
|
||||
if (_.includes(value)) {
|
||||
if (_.includes(value) && !selected) {
|
||||
return _.filter((i) => i !== value);
|
||||
}
|
||||
return selected ? [..._, value] : _; // else no update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue