You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great script that is working well for me after a little debugging. But ultimately it seems it won't do what I need it to: To ignore "child rows" and only sort parents.
What I mean is that I have a table with X rows. Each row has a hidden row underneath it that can be "expanded" or "unfolded". Parent and child have separate classes, i.e.:
<tr class="parent">, <tr class="child">, <tr class="parent">, <tr class="child">
etc. etc.
The parent has 6 sortable columns. When the row is clicked, a child with some text etc. is exposed beneath it, and this child row should not be part of any sorting but always just be "glued" to its parent. An example here: https://nimb.ws/bgT67M (screenshot)
But as soon as the table is sorted with Sorttable, the functionality of the unfolded rows is broken.
Great script that is working well for me after a little debugging. But ultimately it seems it won't do what I need it to: To ignore "child rows" and only sort parents.
What I mean is that I have a table with X rows. Each row has a hidden row underneath it that can be "expanded" or "unfolded". Parent and child have separate classes, i.e.:
<tr class="parent">, <tr class="child">, <tr class="parent">, <tr class="child">
etc. etc.
The parent has 6 sortable columns. When the row is clicked, a child with some text etc. is exposed beneath it, and this child row should not be part of any sorting but always just be "glued" to its parent. An example here: https://nimb.ws/bgT67M (screenshot)
But as soon as the table is sorted with Sorttable, the functionality of the unfolded rows is broken.
The JS code used to expand the parent rows is this: https://codepen.io/jopico/pen/kyRprJ
I've tried but I can't get my head around it. I can't get Sorttable to ignore the child rows when sorting.
The text was updated successfully, but these errors were encountered: