filter searches now start from first page. Fixes #456

This commit is contained in:
Mottie 2013-12-12 08:43:32 -06:00
parent ebe8dd8acb
commit 9a716bec07
2 changed files with 2 additions and 0 deletions

View File

@ -615,6 +615,7 @@
.unbind('filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize '.split(' ').join('.pager ')) .unbind('filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize '.split(' ').join('.pager '))
.bind('filterStart.pager', function(e, filters) { .bind('filterStart.pager', function(e, filters) {
p.currentFilters = filters; p.currentFilters = filters;
p.page = 0; // fixes #456
}) })
// update pager after filter widget completes // update pager after filter widget completes
.bind('filterEnd.pager sortEnd.pager', function() { .bind('filterEnd.pager sortEnd.pager', function() {

View File

@ -203,6 +203,7 @@ tsp = ts.pager = {
.unbind('filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize '.split(' ').join('.pager ')) .unbind('filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize '.split(' ').join('.pager '))
.bind('filterStart.pager', function(e, filters) { .bind('filterStart.pager', function(e, filters) {
p.currentFilters = filters; p.currentFilters = filters;
p.page = 0; // fixes #456
}) })
// update pager after filter widget completes // update pager after filter widget completes
.bind('filterEnd.pager sortEnd.pager', function() { .bind('filterEnd.pager sortEnd.pager', function() {