mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
padding needs to be on ul, not scroll container, or the list blows up
This commit is contained in:
parent
4be2f12a14
commit
9557178ffb
@ -131,7 +131,7 @@ export class LazyListView<T, V extends IView> extends ListView<T, V> {
|
|||||||
private adjustPadding(range: ListRange) {
|
private adjustPadding(range: ListRange) {
|
||||||
const paddingTop = range.start * this.itemHeight;
|
const paddingTop = range.start * this.itemHeight;
|
||||||
const paddingBottom = (range.totalLength - range.end) * 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.paddingTop = `${paddingTop}px`;
|
||||||
style.paddingBottom = `${paddingBottom}px`;
|
style.paddingBottom = `${paddingBottom}px`;
|
||||||
}
|
}
|
||||||
@ -153,8 +153,8 @@ export class LazyListView<T, V extends IView> extends ListView<T, V> {
|
|||||||
return this.scrollContainer;
|
return this.scrollContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
private get _listElement(): Element | undefined {
|
private get _listElement(): HTMLElement | undefined {
|
||||||
return super.root();
|
return super.root() as HTMLElement | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
onAdd(idx: number, value: T) {
|
onAdd(idx: number, value: T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user