Skip to content

Commit bd6d1ad

Browse files
committed
Delete size map when items reducing
1 parent 087ca90 commit bd6d1ad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/virtual.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ export default class Virtual {
7575

7676
updateParam (key, value) {
7777
if (this.param && (key in this.param)) {
78+
// if uniqueIds reducing, find out deleted id and remove from size map
79+
if (key === 'uniqueIds' && (value.length < this.param[key].length)) {
80+
this.sizes.forEach((v, key) => {
81+
if (!value.includes(key)) {
82+
this.sizes.delete(key)
83+
}
84+
})
85+
}
7886
this.param[key] = value
7987
}
8088
}

0 commit comments

Comments
 (0)