mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
fix: prevent horizontal scroll when
This commit is contained in:
parent
c543d2a84e
commit
e156b25d7c
1 changed files with 1 additions and 1 deletions
|
@ -860,7 +860,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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue