mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
chore(combo-box): remove unnecessary selectedId assignments
selectedId is set based on the selectedIndex
This commit is contained in:
parent
8dbcf17e89
commit
382b2f6e85
1 changed files with 0 additions and 2 deletions
|
@ -233,7 +233,6 @@
|
|||
open = !open;
|
||||
if (highlightedIndex > -1 && highlightedIndex !== selectedIndex) {
|
||||
selectedIndex = highlightedIndex;
|
||||
selectedId = items[selectedIndex].id;
|
||||
open = false;
|
||||
}
|
||||
} else if (key === 'Tab') {
|
||||
|
@ -287,7 +286,6 @@
|
|||
active={selectedIndex === i || selectedId === item.id}
|
||||
highlighted={highlightedIndex === i || selectedIndex === i}
|
||||
on:click={() => {
|
||||
selectedId = item.id;
|
||||
selectedIndex = items
|
||||
.map(({ id }) => id)
|
||||
.indexOf(filteredItems[i].id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue