scroller: no reflow if nothing changed
parent
0a7432bd2c
commit
a09d520c8e
|
@ -124,8 +124,15 @@ export default class ScrollerManager extends Mixins(GlobalMixin) {
|
||||||
this.recreate();
|
this.recreate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Height of recycler view
|
||||||
|
const oldRecyclerHeight = this.recyclerHeight;
|
||||||
this.recyclerHeight = this.recycler.$refs.wrapper.clientHeight;
|
this.recyclerHeight = this.recycler.$refs.wrapper.clientHeight;
|
||||||
|
|
||||||
|
// Check if nothing changed
|
||||||
|
if (orderOnly && oldRecyclerHeight === this.recyclerHeight) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Static extra height at top
|
// Static extra height at top
|
||||||
const rb = this.recyclerBefore as Element;
|
const rb = this.recyclerBefore as Element;
|
||||||
const extraHeight = rb?.clientHeight || 0;
|
const extraHeight = rb?.clientHeight || 0;
|
||||||
|
|
Loading…
Reference in New Issue