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

fix(Dropdown): prevent horizontal scroll, when dropdown item selecting
pull/5863/head
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
1 changed files with 1 additions and 1 deletions

View File

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