mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
fix(select-item): keep store subscription
This commit is contained in:
parent
7537b1db98
commit
3cbb903e42
1 changed files with 1 additions and 3 deletions
|
@ -14,13 +14,11 @@
|
|||
|
||||
let selected = false;
|
||||
|
||||
const unsubscribe = ctx.selectedValue.subscribe(currentValue => {
|
||||
ctx.selectedValue.subscribe(currentValue => {
|
||||
if (currentValue === value) {
|
||||
selected = true;
|
||||
}
|
||||
});
|
||||
|
||||
unsubscribe();
|
||||
</script>
|
||||
|
||||
<option class={cx('--select-option', className)} {value} {disabled} {hidden} {style} {selected}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue