scroller: no reflow if nothing changed

old-stable24
Varun Patil 2022-10-14 16:33:55 -07:00
parent 0a7432bd2c
commit a09d520c8e
1 changed files with 7 additions and 0 deletions

View File

@ -124,8 +124,15 @@ export default class ScrollerManager extends Mixins(GlobalMixin) {
this.recreate();
}
// Height of recycler view
const oldRecyclerHeight = this.recyclerHeight;
this.recyclerHeight = this.recycler.$refs.wrapper.clientHeight;
// Check if nothing changed
if (orderOnly && oldRecyclerHeight === this.recyclerHeight) {
return;
}
// Static extra height at top
const rb = this.recyclerBefore as Element;
const extraHeight = rb?.clientHeight || 0;