virtual-list icon indicating copy to clipboard operation
virtual-list copied to clipboard

fix: fix useVirtual invalid in list work with autosizer

Open moonrailgun opened this issue 2 years ago • 1 comments

In AutoSizer

The height pass to children will be 0 at first, and later to real height. and in List, if height === 0, useVirtual will be false. And virtual effect will invalid and all list item will be render.

In your souce code, i think you did wanna to check whether height is a valid number, skip virtual if height not set and not a number. so i think a strict check is better than implicit type conversion.

moonrailgun avatar Feb 16 '23 06:02 moonrailgun

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
virtual-list ❌ Failed (Inspect) Feb 16, 2023 at 6:54AM (UTC)

vercel[bot] avatar Feb 16 '23 06:02 vercel[bot]