AllenFang / AllenFang/react-bootstrap-table

Delete rows in nested / expanded array not working

Open
#1,614 1 comment 0 reactions 0 assignees View on GitHub
bug react-bootstrap-table2
Dominant language
JavaScript
Stars
2.2k
Forks
761
PR merge metrics
No merged PRs in 30d

Description

Hello community,
after three days I would need help pls. I have an array with a nested Array in it. My main goal is to delete or add rows in the nested array.

We can start with this example, its almost the same: [Example expandRow](https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/expandRow/expandRow.js)
In this example my goal would be to delete all rows in the inner array "expand" (fieldA:test1,...)

I have modified this example only with three things:
`insertRow`, `deleteRow` and `selectRow={ selectRowTableTaenze } ` thereby we can select and delete a row.

Lets have a look on the fiddle now: https://jsfiddle.net/9cqubzgd/

Now in our example we have 5 rows.
We click on the first row "Item name 1". We see in the expanded table the values "fieldA", "fieldB" ... and so on WITH the new buttons `insertRow `and `deleteRow`. Now we delete all rows in the inner table (test1, test2) -> now we should have "Item name 1" with NO inner rows.

But if we click now on "Item name 2" and click back to "item name 1" all rows from the inner Array are back in "item name 1".

Hopefully clear what I mean and thank you for your time

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.