How to make row static in table sorter by maintaining its index position within its parent instead of the whole table

How to make row static in table sorter by maintaining its index position within its parent instead of the whole table

I have a requirement in table sorter with Tree Tables. See the example at http://keyboarddrummer.github.io/tablesorter/docs/example-tree-table.html

It sorts at the parent level and then inside the respective parents, it shorts child rows within that parent which is great.

My requirement is for making a row static so that row should not sort and maintain its index within the parent.

There is static row widget: https://mottie.github.io/tablesorter/docs/example-widget-static-row.html But it will lock the static row in its position/index in the table including parent index.

So suppose, if I mark 'Caïro'(index=2, row=3) as static inside 'Africa -> Egypt' then on sorting, above widget will show 'Caïro' on row 3rd only and hence 'Africa -> Egypt' will not have 'Caïro' so 'Caïro' moves out from parent.

And my requirement with above example is that, 'Caïro' position/index should be maintained at index 0 inside Africa -> Egypt.

So after sorting as per the second screen below, 'Caïro' should be at index 0 and should be ignored in sorting and 'Luxor' should be sorted from index 1 onwards with rest of the rows(if present).



If anyone can help me on this, it would save my day. :)

Thanks.