Nested Rows collapsed by default

Hi,

I would like to know if there is a way to have the nested rows collapsed on rendering the table.

Thanks.

Hi @nikita.khamnaev

Yes, you can have all rows collapsed after initialization.

Nested rows uses row trimming so you can pass defined rows via trimRows option. Here’s an example: http://jsfiddle.net/handsoncode/981zr3dp/

Hi,

This is helpful already.
Unfortunately it is breaking when a new row is added.
I guess we will need to update the indexes on every row insert and remove .

Best,
Vitalie

Yes, you would need to update this array of hidden rows. To check if a new row is added you can use the afterCreateRow callback.
Docs: https://docs.handsontable.com/pro/1.10.0/Hooks.html#event:afterCreateRow