Skip to content

Commit

Permalink
fix(#2304): scroll to selected option when dropdown expanded
Browse files Browse the repository at this point in the history
  • Loading branch information
BumbleB2na committed Jan 30, 2025
1 parent ffca8ef commit affc992
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libs/web-components/src/components/dropdown/Dropdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@
}
function setHighlightedToSelected() {
if (!_filterable) return;
if (!_selectedOption) {
_highlightedIndex = -1;
return;
Expand Down Expand Up @@ -336,6 +335,7 @@
setTimeout(() => {
if (_selectedOption) {
setHighlightedToSelected();
scrollToHighlighted();
}
}, 0);
}, 0);
Expand Down Expand Up @@ -473,9 +473,7 @@
}
async function onChevronClick(e: Event) {
await tick();
showMenu();
e.stopPropagation();
}
function onFocus(e: Event) {
Expand Down

0 comments on commit affc992

Please sign in to comment.