From 9557178ffbb7303b1a74d3a46d03616e3256c9b5 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 23 Nov 2021 14:25:35 +0100 Subject: [PATCH] padding needs to be on ul, not scroll container, or the list blows up --- src/platform/web/ui/general/LazyListView.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/web/ui/general/LazyListView.ts b/src/platform/web/ui/general/LazyListView.ts index a29e434c..4686c5ea 100644 --- a/src/platform/web/ui/general/LazyListView.ts +++ b/src/platform/web/ui/general/LazyListView.ts @@ -131,7 +131,7 @@ export class LazyListView extends ListView { private adjustPadding(range: ListRange) { const paddingTop = range.start * this.itemHeight; const paddingBottom = (range.totalLength - range.end) * this.itemHeight; - const style = this.scrollContainer!.style; + const style = this._listElement!.style; style.paddingTop = `${paddingTop}px`; style.paddingBottom = `${paddingBottom}px`; } @@ -153,8 +153,8 @@ export class LazyListView extends ListView { return this.scrollContainer; } - private get _listElement(): Element | undefined { - return super.root(); + private get _listElement(): HTMLElement | undefined { + return super.root() as HTMLElement | undefined; } onAdd(idx: number, value: T) {