From 9a716bec0758c0f999b00666eeb4aef15dc9dc92 Mon Sep 17 00:00:00 2001 From: Mottie Date: Thu, 12 Dec 2013 08:43:32 -0600 Subject: [PATCH] filter searches now start from first page. Fixes #456 --- addons/pager/jquery.tablesorter.pager.js | 1 + js/widgets/widget-pager.js | 1 + 2 files changed, 2 insertions(+) diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index c789cb8e..6ea76527 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -615,6 +615,7 @@ .unbind('filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize '.split(' ').join('.pager ')) .bind('filterStart.pager', function(e, filters) { p.currentFilters = filters; + p.page = 0; // fixes #456 }) // update pager after filter widget completes .bind('filterEnd.pager sortEnd.pager', function() { diff --git a/js/widgets/widget-pager.js b/js/widgets/widget-pager.js index 62e289cf..c26115ae 100644 --- a/js/widgets/widget-pager.js +++ b/js/widgets/widget-pager.js @@ -203,6 +203,7 @@ tsp = ts.pager = { .unbind('filterStart filterEnd sortEnd disable enable destroy update updateRows updateAll addRows pageSize '.split(' ').join('.pager ')) .bind('filterStart.pager', function(e, filters) { p.currentFilters = filters; + p.page = 0; // fixes #456 }) // update pager after filter widget completes .bind('filterEnd.pager sortEnd.pager', function() {