petyosi / react-virtuoso

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

[BUG] After changing data - adding/deleting one item from the array, the table automatically re-renders. #978

Closed will-yjn closed 1 year ago

will-yjn commented 1 year ago

Describe the bug I am using the the TableVirtuoso component. After changing data, say, adding or deleting one item from the array, the table automatically re-renders. And the table starts from row one.

Expected behavior The view stays where the data is deleted.

Desktop (please complete the following information): MacOS/Chrome

petyosi commented 1 year ago

The table has no concept of tracking the data item identity across data prop changes. You should be handling this by yourself.