Closed Mil4n0r closed 6 months ago
Closed for now until the topic is discussed.
Reopened, will remove it from Draft when I receive more feedback in the issue.
The new problem shared by Alan is caused by the fact that we are currently using index
from the map to set the keys. That is a problem that I detected while working in the code quality PR and is pending to be fixed, as it is considered a bad practice in React (Specially for sortable data).
This would lead to 2 possible solutions:
I have added a new mechanism to generate keys prior to making the sorting. Generate an intermediate structure with separate ids and cells preventing us from having to change the rows
prop structure.
I have done testing in local to ensure that it was working properly with a similar example than the one Alan shared (using ReactHookForm).
After we merge this, I will talk to him and ensure that it is working as expected for their specific use case.
Checklist (Check off all the items before submitting)
/lib
directory./website
as needed.Description When interacting with
Checkbox
or any other changeable element, the page would be set to 1 no matter what the situation were. I have implemented a new logic in order to track changes when adding or removing rows.I still haven't changed the tests because I want the new logic to be validated first, I also have doubts about how to handle both add/remove rows and cases where the data changes entirely (this last one not being taken into account right now).
Closes #1936