summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-08-15 09:19:02 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-08-15 09:19:02 -0400
commitac03c3155a8ee0a158b6504eb0174b68cfbade38 (patch)
tree393450ec2fc6866dcf26479dbbbfaba34dfb3085
parent3a1947ce25ef524409da7a7c1e51214b2c44f1e5 (diff)
Always return to the first page of results after searching.
* js/guix-packages.js (guix.controller.prototype.doSearch): Reset currentPageIndex to 0.
-rw-r--r--js/guix-packages.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/guix-packages.js b/js/guix-packages.js
index 03aa345..2e840f4 100644
--- a/js/guix-packages.js
+++ b/js/guix-packages.js
@@ -131,6 +131,8 @@ guix.controller = (function() {
return regexp.test(package.name) ||
regexp.test(package.synopsis);
}), this.pageSize));
+ // Reset pagination
+ this.currentPageIndex = 0;
};
controller.prototype.sortBy = function(field) {