Closed swifferly closed 7 years ago
Swifferly, did you find a solution to this? I have a similar problem.
Not yet.
From: Pete Jones [mailto:notifications@github.com] Sent: 19 April 2016 18:08 To: filamentgroup/tablesaw tablesaw@noreply.github.com Cc: Hesseltje van Goor hesseltje.vangoor@eigentech.com Subject: Re: [filamentgroup/tablesaw] Sorting & showing \ hiding detail rows (#148)
Swifferly, did you find a solution to this? I have a similar problem.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/filamentgroup/tablesaw/issues/148#issuecomment-212021093
There are two kind-of hidden features in Tablesaw to deal with this (available in 3.x):
<tr data-tablesaw-subrow>
will “combine” a row with the previous (probably what you want here for detail rows)<tr data-tablesaw-ignorerow>
ignores rows and leaves them in place.
Dear filamentgroup
Question – I am using this snippet of jQuery to hide detail rows:
What I can’t work out is how to get this functionality working after the table has been sorted. I’ve tried limiting your getTableSort function to just the .parent, like so:
Which seems to work well – except that the detail rows get deleted once the table is sorted.
I found a Stackoverflow solution which suggests associating the child rows with the .parent class pre-sort, and then redrawing them post-sort.
Unfortunately I’m not familiar enough with jQuery or your code to know where to integrate this.
Any thoughts would be hugely appreciated.