reactgrid icon indicating copy to clipboard operation
reactgrid copied to clipboard

Parent child rows

Open lakshyadosi opened this issue 1 year ago • 6 comments

Describe the bug Not able to create parent and child rows.

Current behavior Normal grid data is present

Expected behavior I want tree-like structure, where user can add parent rows and child rows inside the parent row. There should be a button on top which allows user to add parent row. And each parent has button in the action column named as Add child row, through which user can add child rows

lakshyadosi avatar Jul 25 '24 05:07 lakshyadosi

@lakshyadosi Do you mean collapsible cells like in this example?

webloopbox avatar Jul 31 '24 12:07 webloopbox

Saw this; I also ran into this earlier on;

But essentially to get this to work, the following props need to be populated even if in the documentation, it says they're optional: isExpanded and: hasChildren

alongside parentId

If your rows have all 3 set correctly, then you'll render these correctly

DhenPadilla avatar Aug 12 '24 12:08 DhenPadilla

Saw this; I also ran into this earlier on;

But essentially to get this to work, the following props need to be populated even if in the documentation, it says they're optional: isExpanded and: hasChildren

alongside parentId

If your rows have all 3 set correctly, then you'll render these correctly

Have you tried this @lakshyadosi? Does it actually solve the problem?

Michota avatar Aug 22 '24 11:08 Michota

I am interested to see the code of the examples but I cannot find it.

dregre avatar Oct 02 '24 16:10 dregre

I am interested to see the code of the examples but I cannot find it.我有兴趣查看示例的代码,但我找不到它。

me too

ww1724 avatar Oct 19 '24 19:10 ww1724

The source code for the examples can be found here.

webloopbox avatar Jan 14 '25 16:01 webloopbox