You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The expand cell retains the old expandable state even if the nonExpandable array has changed.
To Reproduce
Initialize a table with a nonExpandable empty array.
All the rows are expandable, and that is OK.
After the first render, update that nonExpandable array to include some row ids.
At this point, those rows should not be expandable, and they aren't, but the expand cell still looks like it could expand, because the prop expandable remained true.
In the provided codesandbox the rows 1 and 2 should not have the "plus" sign because they are not expandable.
@AllenFang I think I can still reproduce the same issue in case of data change rather than nonExpandable change.
This is happening to me when i build up table data from different API feeds, and the API responses come in at different times.
So the table is re-rendered with the new data, but the expandable prop of the expandColumnRenderer function is kept as it was at first render.
I am for now overcoming this by entirely remounting (with key) the table when the data change but this looks like a bug on the library.
Describe the bug
The expand cell retains the old
expandable
state even if thenonExpandable
array has changed.To Reproduce
Initialize a table with a
nonExpandable
empty array.All the rows are expandable, and that is OK.
After the first render, update that
nonExpandable
array to include some row ids.At this point, those rows should not be expandable, and they aren't, but the expand cell still looks like it could expand, because the prop
expandable
remainedtrue
.In the provided codesandbox the rows 1 and 2 should not have the "plus" sign because they are not expandable.
codesandbox
https://codesandbox.io/s/react-bootstrap-table-next-basic-example-007mn?file=/src/index.js
The text was updated successfully, but these errors were encountered: