Skip to content

Expand cell retains expandable state even if the nonExpandable array has changed #1377

Closed
@pastinepolenta

Description

@pastinepolenta

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.

codesandbox
https://codesandbox.io/s/react-bootstrap-table-next-basic-example-007mn?file=/src/index.js

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions