AllenFang / AllenFang/react-bootstrap-table

Delete rows in nested / expanded array not working

未關閉
#1,614 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug react-bootstrap-table2
主要語言
JavaScript
星號
2.2k
分支
761
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。