petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.13k stars 299 forks source link

[BUG] Zero-sized element, this should not happen #1060

Closed mstykow closed 4 months ago

mstykow commented 4 months ago

Describe the bug The error "zero-sized element, this should not happen" appears as of upgrading to v4.7.7. There is also a react-virtuoso internal exception along the lines of "Cannot read properties of null (reading 'dataset')".

This commit seems to have introduced the issue: https://github.com/petyosi/react-virtuoso/commit/1f8c8ee833fe1efafe4879e709316d0c4812bb9c

Reproduction Use virtualized lists and click around so that the underlying data changes, i.e., re-renders/mounts/unmounts occur.

Sorry, I don't have time for a codesandbox. If you don't like that, feel free to close my report. I'm locking my version to 4.7.6.

Screenshots image

Additional context This error has been discussed in other issues such as #433 and #206.

petyosi commented 4 months ago

I see you are referencing this from another open repository. Any directions on how I can reproduce it there?

mstykow commented 4 months ago

I see you are referencing this from another open repository. Any directions on how I can reproduce it there?

Yes:

  1. check out the repo
  2. change react-virtuoso to version 4.7.7 in package.json and run yarn install
  3. start the app with yarn start and open the example file example-files/opossum_input.json
  4. click around the resources (files) in the left column, for example index.tsx, and notice console errors.
github-actions[bot] commented 4 months ago

:tada: This issue has been resolved in version 4.7.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket: