mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
fix(combo-box): reset selectedIndex
This commit is contained in:
parent
0ca50d988e
commit
d9bbd5529e
1 changed files with 5 additions and 0 deletions
|
@ -129,6 +129,11 @@
|
||||||
filteredItems = items.filter((item) => shouldFilterItem(item, value));
|
filteredItems = items.filter((item) => shouldFilterItem(item, value));
|
||||||
} else {
|
} else {
|
||||||
highlightedIndex = -1;
|
highlightedIndex = -1;
|
||||||
|
|
||||||
|
if (!selectedItem) {
|
||||||
|
selectedId = undefined;
|
||||||
|
selectedIndex = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue