react-virtualized
react-virtualized copied to clipboard
React `key` prop is not respected in Table/Column
Bug Report
https://user-images.githubusercontent.com/7879714/157403251-7a1c4fcc-744d-4e50-91c6-9b5ed92b1389.mov
The reason behind the weird behavior is because the key property isn't been respected by Table and Column.
Not breaking the key prop is crucial for many react apps. Please refer Kent C. Dodds' blog post linked above for details about the key property.
What is the current behavior?
The table has a single column of items, each is assigned the key=# property.
To reproduce the bug:
- Edit text
key=3, change me...to something else - Hit the button of
Remove First Row - See the changes you made in 1. is gone
What is the expected behavior?
Expected behavior:
The change in the key=3 row should not lost.
Which versions of React and react-virtualized, and which browser / OS are affected by this issue? Did this work in previous versions of react-virtualized?
As of testing:
- react: 17.0.2
- react-virtualized: 9.22.3
The issue is OS independent