From d4e923f9de02168e2e049cf83932aaf41a0ac8cc Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Sat, 24 Jul 2021 13:42:57 +0530 Subject: [PATCH] Remove code from loadList We don't need this method so best to leave it empty. Signed-off-by: RMidhunSuresh --- src/platform/web/ui/general/LazyListView.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/platform/web/ui/general/LazyListView.js b/src/platform/web/ui/general/LazyListView.js index 4426d97c..b6b4b0d1 100644 --- a/src/platform/web/ui/general/LazyListView.js +++ b/src/platform/web/ui/general/LazyListView.js @@ -168,6 +168,8 @@ export class LazyListView extends ListView { mount() { const root = super.mount(); + this._subscription = this._list.subscribe(this); + this._childInstances = []; this._parent = el("div", {className: "LazyListParent"}, root); /* Hooking to scroll events can be expensive. @@ -181,17 +183,12 @@ export class LazyListView extends ListView { update(attributes) { this._renderRange = null; super.update(attributes); + this._childInstances = []; this._initialRender(); } loadList() { - if (!this._list) { return; } - this._subscription = this._list.subscribe(this); - this._childInstances = []; - /* - super.loadList() would render the entire list at this point. - We instead lazy render a part of the list in _renderIfNeeded - */ + // We don't render the entire list; so nothing to see here. } _removeChild(child) {