Open gerrybardo opened 6 years ago
Hey @gerrybardo
Thanks for getting in touch, and sorry to hear you are having troubles.
The dataTree functionality is a new addition to Tabulator, and at the moment will only handle child rows as they are loaded into the table. they cannot be moved between different parents.
This functionality will be coming in a later version of Tabulator.
Cheers
Oli :)
@gerrybardo what solution did you end up using?
I have to do something similar soon.
I figure if this is still an issue, as the change by Oli seems to indicate, I could listen to movableRowsReceived, sort out the _children manually in the data and maybe force a redraw if there are problems.
IThis is a tricky one to implement as it is hard to know at what level you want Tabulator to inser the moved row
@olifolkerd This feature is important to us and we would like to contribute to make it happen; could you give us some pointers to get us started so that we are aligned on what is required/expected? Thanks!
I had the same issue just moving nodes with the same parent, but in my case I have an "Order" column that gives the order each item is supposed to be in. If I sort by this column and re-order the elements using this field, it works with the same parent. I think part of the re-ordering problem is sorting, so when I fix the ordering so that it retains the proper sort order.
I'm going to try a similar thing on moving between parents next. The approach I'm going to use is to try to introspect the internal structure and make it match by manually re-parenting and re-ordering.
+1
Still any progress?
Describe the bug Using a DataTree and Moveable rows in One Table. Moving one row to another dataTree Group works visually fine, but if i collapse the dataGroup i moved the row from the row gets reset to their default
Tabulator Info
To Reproduce Steps to reproduce the behavior:
Expected behavior When i Move a Row from one Group to the Other an collapse these Groups, the Rows should stay in Position and not reset to its default
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.