File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 81
81
// Update the table by executing some of tablesorter's triggers
82
82
// This will apply any widgets or pagination, if used.
83
83
$ ( table ) . trigger ( "update" ) ;
84
- $ ( table ) . trigger ( "appendCache" ) ;
84
+ if ( resultRows . length ) {
85
+ $ ( table ) . trigger ( "appendCache" ) ;
86
+ // Apply current sorting after restoring rows
87
+ $ ( table ) . trigger ( "sorton" , [ table . config . sortList ] ) ;
88
+ }
85
89
86
90
if ( table . config . debug ) { $ . tablesorter . benchmark ( "Apply filter:" , cacheTime ) ; }
87
91
101
105
102
106
$ ( table ) . trigger ( "update" ) ;
103
107
$ ( table ) . trigger ( "appendCache" ) ;
108
+ // Apply current sorting after restoring all rows
109
+ $ ( table ) . trigger ( "sorton" , [ table . config . sortList ] ) ;
104
110
105
111
if ( table . config . debug ) { $ . tablesorter . benchmark ( "Clear filter:" , cacheTime ) ; }
106
112
You can’t perform that action at this time.
0 commit comments