Refactor on VirtualScroller

pull/1453/head
mertsincan 2021-08-16 10:28:33 +03:00
parent 1ac34d77ca
commit 1983225b2f
1 changed files with 5 additions and 3 deletions

View File

@ -95,9 +95,11 @@ export default {
loading(newValue) { loading(newValue) {
this.d_loading = newValue; this.d_loading = newValue;
}, },
items() { items(newValue, oldVal) {
if (!oldVal || oldVal.length !== (newValue || []).length) {
this.init(); this.init();
} }
}
}, },
methods: { methods: {
init() { init() {
@ -512,7 +514,7 @@ export default {
} }
} }
return null; return [];
} }
} }
} }