提交 3856d318 编写于 作者: R rebornix

no scroll height update hack

上级 1ff083cc
......@@ -342,6 +342,8 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
if (this.supportDynamicHeights) {
this._rerender(this.lastRenderTop, this.lastRenderHeight);
}
this.eventuallyUpdateScrollDimensions();
}
splice(start: number, deleteCount: number, elements: T[] = []): T[] {
......@@ -438,11 +440,7 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
private eventuallyUpdateScrollDimensions(): void {
this._scrollHeight = this.contentHeight;
if (this.scrollableElement.getScrollDimensions().height > this._scrollHeight) {
this.rowsContainer.style.height = `${this.scrollableElement.getScrollDimensions().height}`;
} else {
this.rowsContainer.style.height = `${this._scrollHeight}px`;
}
this.rowsContainer.style.height = `${this._scrollHeight}px`;
if (!this.scrollableElementUpdateDisposable) {
this.scrollableElementUpdateDisposable = DOM.scheduleAtNextAnimationFrame(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册