From 0e0976c7f56ae0b6c889ce97a1c1fc9b64d2640b Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 16 Jul 2021 00:22:46 +0530 Subject: [PATCH] Inline method Signed-off-by: RMidhunSuresh --- src/platform/web/ui/general/LazyListView.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/platform/web/ui/general/LazyListView.js b/src/platform/web/ui/general/LazyListView.js index 84578f0d..f4ceb5c8 100644 --- a/src/platform/web/ui/general/LazyListView.js +++ b/src/platform/web/ui/general/LazyListView.js @@ -106,17 +106,6 @@ export class LazyListView extends ListView { this._renderElementsInRange(); } - _renderItems(items) { - this._childInstances = []; - const fragment = document.createDocumentFragment(); - for (const item of items) { - const view = this._childCreator(item); - this._childInstances.push(view); - fragment.appendChild(mountView(view, this._mountArgs)); - } - this._root.appendChild(fragment); - } - _itemsFromList(start, end) { const array = []; let i = 0; @@ -140,7 +129,14 @@ export class LazyListView extends ListView { child.root().remove(); child.unmount(); } - this._renderItems(renderedItems); + this._childInstances = []; + const fragment = document.createDocumentFragment(); + for (const item of renderedItems) { + const view = this._childCreator(item); + this._childInstances.push(view); + fragment.appendChild(mountView(view, this._mountArgs)); + } + this._root.appendChild(fragment); } mount() {