AllenFang / AllenFang/react-bootstrap-table

Delete rows in nested / expanded array not working

Aberta
#1,614 1 comentário 0 reações 0 responsáveis Ver no GitHub
bug react-bootstrap-table2
Linguagem predominante
JavaScript
Estrelas
2.2k
Forks
761
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.