Could you please take a look into the tiny sandbox project?
I have a simple react table, each row contains a "raw" data and the same data as a select box value. when I delete a row, the table is rerendered correctly, the "raw" data is displayed correctly, but the selected value in the select boxes stay unchanged. Why?
Thanks in advance!
P.S. when I try to change the Select attribute from "defaultValue" to "value", the row deletion start to work correctly, but in this case it is not possible any more to modify the selectbox value.
Could you please take a look into the tiny sandbox project?
https://codesandbox.io/p/sandbox/festive-nova-s58h2v
I have a simple react table, each row contains a "raw" data and the same data as a select box value. when I delete a row, the table is rerendered correctly, the "raw" data is displayed correctly, but the selected value in the select boxes stay unchanged. Why?
Thanks in advance!
P.S. when I try to change the Select attribute from "defaultValue" to "value", the row deletion start to work correctly, but in this case it is not possible any more to modify the selectbox value.
Share Improve this question edited Mar 28 at 12:16 Andrei Isakov asked Mar 28 at 7:56 Andrei IsakovAndrei Isakov 591 silver badge3 bronze badges1 Answer
Reset to default 0I managed to resolve the issue. I added an "external" onChange handler to my select box properties. The handler comes from the parent table and it rewrites the columns model on the update event. The sandbox project now works as expected