From 47fdee3ebbae900ba815fba8c18e3a0566aa8f8c Mon Sep 17 00:00:00 2001 From: Jinke Li Date: Thu, 18 Jan 2024 18:00:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(table-sheet):=20=E4=BF=AE=E5=A4=8D=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E8=A1=A8=E9=85=8D=E7=BD=AE=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=A1=8C=E9=AB=98=E5=90=8E=E5=B1=95=E7=A4=BA=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=20close=20#2501=20(#2521)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/__tests__/bugs/issue-2501-spec.ts | 4 ++-- packages/s2-core/src/facet/base-facet.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/s2-core/__tests__/bugs/issue-2501-spec.ts b/packages/s2-core/__tests__/bugs/issue-2501-spec.ts index 143c76f1ad..ac2670fce1 100644 --- a/packages/s2-core/__tests__/bugs/issue-2501-spec.ts +++ b/packages/s2-core/__tests__/bugs/issue-2501-spec.ts @@ -29,10 +29,10 @@ const s2Options: S2Options = { describe('Table Sheet Row Offsets Tests', () => { let s2: SpreadSheet; - beforeEach(() => { + beforeEach(async () => { s2 = new TableSheet(getContainer(), s2DataConfig, s2Options); - s2.render(); + await s2.render(); }); test('should get correctly row offset data', () => { diff --git a/packages/s2-core/src/facet/base-facet.ts b/packages/s2-core/src/facet/base-facet.ts index 8375b25398..82cf8be8b9 100644 --- a/packages/s2-core/src/facet/base-facet.ts +++ b/packages/s2-core/src/facet/base-facet.ts @@ -181,6 +181,10 @@ export abstract class BaseFacet { scrollY: number, ): PanelIndexes; + public abstract getViewCellHeights( + layoutResult?: LayoutResult, + ): ViewCellHeights; + public abstract getViewCellHeights(): ViewCellHeights; public abstract addDataCell(cell: DataCell): void;