mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Pager: update widgets & fire pagerComplete after cache is built
This commit is contained in:
parent
e42bfdfafa
commit
fe81a867fc
@ -473,7 +473,6 @@
|
||||
p.last.totalRows = p.totalRows;
|
||||
p.last.currentFilters = p.currentFilters;
|
||||
p.last.sortList = (c.sortList || []).join(',');
|
||||
updatePageDisplay(table, p, true);
|
||||
$t.trigger('updateCache', [function(){
|
||||
if (p.initialized) {
|
||||
// apply widgets after table has rendered & after a delay to prevent
|
||||
@ -482,6 +481,7 @@
|
||||
$t
|
||||
.trigger('applyWidgets')
|
||||
.trigger('pagerChange', p);
|
||||
updatePageDisplay(table, p, true);
|
||||
}, 0);
|
||||
}
|
||||
}]);
|
||||
|
@ -781,4 +781,3 @@ $.extend($.tablesorter.language, {
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -6282,7 +6282,7 @@ widget.format( table, table.config, table.config.widgetOptions );</pre>
|
||||
As a full example, say you have a header cell with a class name of <code>"event"</code>. And you want to use the <code>textExtraction</code> function for that column, then you would use this function as follows:
|
||||
<pre class="prettyprint lang-js">var table = $('table')[0],
|
||||
textExtractionFunction = $.tablesorter.getColumnData( table, table.config.textExtraction, ".event" );</pre>
|
||||
The <code>".event"</code> key can be replaces with a zero-based column index, if the <code>textExtraction</code> option is set up using indexes.
|
||||
The <code>".event"</code> key can be replaced with a zero-based column index, if the <code>textExtraction</code> option is set up using indexes.
|
||||
<p></p>
|
||||
This function is sometimes used in conjunction with the <code>getData</code> function. This function is called first because the getData function uses the result in the <code>configHeaders</code> parameter - the <code>config.headers</code> option result from this function would be an object and not a function.
|
||||
</div>
|
||||
|
@ -278,9 +278,9 @@ tsp = ts.pager = {
|
||||
}
|
||||
tsp.hideRows(table, c);
|
||||
tsp.changeHeight(table, c);
|
||||
tsp.updatePageDisplay(table, c);
|
||||
// make sure widgets are applied - fixes #450
|
||||
c.$table.trigger('applyWidgets');
|
||||
tsp.updatePageDisplay(table, c);
|
||||
})
|
||||
.on('pageSize.pager refreshComplete.pager', function(e,v){
|
||||
e.stopPropagation();
|
||||
@ -708,7 +708,6 @@ tsp = ts.pager = {
|
||||
p.last.currentFilters = p.currentFilters;
|
||||
p.last.sortList = (c.sortList || []).join(',');
|
||||
p.initializing = false;
|
||||
tsp.updatePageDisplay(table, c);
|
||||
$t.trigger('updateCache', [function(){
|
||||
if (p.initialized) {
|
||||
// apply widgets after table has rendered & after a delay to prevent
|
||||
@ -717,6 +716,7 @@ tsp = ts.pager = {
|
||||
$t
|
||||
.trigger('applyWidgets')
|
||||
.trigger('pagerChange', p);
|
||||
tsp.updatePageDisplay(table, c);
|
||||
}, 0);
|
||||
}
|
||||
}]);
|
||||
|
Loading…
Reference in New Issue
Block a user