Skip to content

Commit

Permalink
fix(grid): fix grid calculate failed when container was hidden (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang authored Nov 5, 2021
1 parent 6b1162a commit 18a09d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/grid/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export class Grid<Container extends HTMLElement> {
})
const digestSize = batch.bound(() => {
const rect = this.container.getBoundingClientRect()
if (!rect.width || !rect.height) return
if (this.width !== rect.width) {
this.width = rect.width
}
Expand Down

0 comments on commit 18a09d4

Please sign in to comment.