maxazan / jquery-treegrid

TreeGrid plugin for jQuery
http://maxazan.github.io/jquery-treegrid
MIT License
553 stars 222 forks source link

New appended child is out of order #15

Open winonalakereid opened 10 years ago

winonalakereid commented 10 years ago

In the example below, if I had a button that added a new child for treegrid-1, it would show up in the table at the bottom. It isn't hard in jquery to make the the new child show up after the last tr with the class of treegrid-parent-1, but if that last child has children as well, the new treegrid-1 child shows up in the table before the children of the last child. In general I'm just having trouble adding children and having them show up in the correct order. Any help would be awesome!

Node 1Additional info Node 1-1Additional info Node 2Additional info Node 2-1Additional info
skworden commented 9 years ago

I believe my problem is the same as this.

One level deep nest / groups properly

If it's deeper than one level it isn't nesting the child elements under the proper parent attribute. However, the open and close toggle icon, opens and closes the correct elements event though they aren't in the right location on the grid. I don't know if it's because the PK and Parent fields are strings and not integers (I'm using NoSQL). treegrid