From 18a09d425163fdca8441b2adf0de53acd4c003fc Mon Sep 17 00:00:00 2001 From: Janry Date: Fri, 5 Nov 2021 17:19:23 +0800 Subject: [PATCH] fix(grid): fix grid calculate failed when container was hidden (#2400) --- packages/grid/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/grid/src/index.ts b/packages/grid/src/index.ts index e6645936dc9..b13d8d61a59 100644 --- a/packages/grid/src/index.ts +++ b/packages/grid/src/index.ts @@ -236,6 +236,7 @@ export class Grid { }) const digestSize = batch.bound(() => { const rect = this.container.getBoundingClientRect() + if (!rect.width || !rect.height) return if (this.width !== rect.width) { this.width = rect.width }