Tablesorter-Static-Row-Plugin icon indicating copy to clipboard operation
Tablesorter-Static-Row-Plugin copied to clipboard

Works only if sortList option is not defined in table config

Open impact11 opened this issue 11 years ago • 2 comments

If you define a multiple sortList option in your tablesorter definition, the plugin fails because tablesorter applies the widgets only after the multisort takes place.

For example, this succeeds:

$("mytable").tablesorter({
  widgets : ['staticRow','zebra'],
  headers : {
    3 : {
      sorter : 'draft_size'
      }
   }
}

whereas this fails:

$("mytable").tablesorter({
  sortList : [[9,1],[3,1],[2,0],[7,1],[5,1],[2,0]],
  widgets : ['staticRow','zebra'],
  headers : {
    3 : {
      sorter : 'draft_size'
      }
   }
}

impact11 avatar Jul 01 '13 02:07 impact11

Hi there - I'm not really familiar with the sortList option here, but I'll endeavour to take a look and see if I can get this working this week. Sorry for the delay, I've been very busy! :)

ascii-soup avatar Jul 08 '13 13:07 ascii-soup

No worries, it's mostly a comment for others, but if you can figure out a way of running a widget before the sortList is applied, then it'll be on the right track. I couldn't. :-)

impact11 avatar Jul 08 '13 21:07 impact11