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?
Bug Report
Code Sandbox Demo
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 byTable
andColumn
.Learn more about the
key
propNot breaking the
key
prop is crucial for many react apps. Please refer Kent C. Dodds' blog post linked above for details about thekey
property.What is the current behavior?
The table has a single column of items, each is assigned the
key=#
property.To reproduce the bug:
key=3, change me...
to something elseRemove First Row
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:
The issue is OS independent