Merge pull request #6862 from avramz/virtual-scroller-lazy

#6776 fix: Virtual scroller: step prop in delay mode breaks the component
pull/6877/head
Tuğçe Küçükoğlu 2024-11-26 10:42:13 +03:00 committed by GitHub
commit 05530cc474
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -621,7 +621,7 @@ export default {
return Math.floor(((first ?? this.first) + this.d_numToleratedItems * 4) / (this.step || 1)); return Math.floor(((first ?? this.first) + this.d_numToleratedItems * 4) / (this.step || 1));
}, },
isPageChanged(first) { isPageChanged(first) {
return this.step ? this.page !== this.getPageByFirst(first ?? this.first) : true; return this.step && !this.lazy ? this.page !== this.getPageByFirst(first ?? this.first) : true;
}, },
setContentEl(el) { setContentEl(el) {
this.content = el || this.content || findSingle(this.element, '[data-pc-section="content"]'); this.content = el || this.content || findSingle(this.element, '[data-pc-section="content"]');