mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(Dropdown): update selectedId when selectedIndex changes. (#611)
This commit is contained in:
parent
b810404afa
commit
2013120428
1 changed files with 1 additions and 0 deletions
|
@ -128,6 +128,7 @@
|
||||||
}
|
}
|
||||||
$: inline = type === "inline";
|
$: inline = type === "inline";
|
||||||
$: selectedItem = items[selectedIndex];
|
$: selectedItem = items[selectedIndex];
|
||||||
|
$: selectedId = items[selectedIndex] ? items[selectedIndex].id : undefined;
|
||||||
$: if (!open) {
|
$: if (!open) {
|
||||||
highlightedIndex = -1;
|
highlightedIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue