Merge pull request #5758 from KumJungMin/fix/issue-4488

fix(Dropdown): prevent horizontal scroll, when dropdown item selecting
This commit is contained in:
Tuğçe Küçükoğlu 2024-06-10 10:37:40 +03:00 committed by GitHub
commit 6c05222fd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -862,7 +862,7 @@ export default {
const element = DomHandler.findSingle(this.list, `li[id="${id}"]`);
if (element) {
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' });
element.scrollIntoView && element.scrollIntoView({ block: 'nearest' });
} else if (!this.virtualScrollerDisabled) {
this.virtualScroller && this.virtualScroller.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex);
}