Skip to content

Commit 876ded6

Browse files
es021hobywhan
andauthored
fix: flicker issue in ios when scrolling up (#864)
* fix flicker issue in ios * refactor: simplify code --------- Co-authored-by: Hoby-whan Carpe <hobywhan@free.fr>
1 parent 1c24e07 commit 876ded6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/vue-virtual-scroller/src/components/DynamicScrollerItem.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ export default {
8585
// since we are reusing the same DOM node
8686
const oldSize = this.vscrollData.sizes[oldValue]
8787
const size = this.vscrollData.sizes[value]
88-
if (oldSize != null && oldSize !== size) {
88+
89+
if (size != null && size !== oldSize) {
90+
this.applySize(size)
91+
} else if (oldSize != null && oldSize !== size) {
8992
this.applySize(oldSize)
9093
}
9194
}

0 commit comments

Comments
 (0)