From ac03c3155a8ee0a158b6504eb0174b68cfbade38 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 15 Aug 2014 09:19:02 -0400 Subject: Always return to the first page of results after searching. * js/guix-packages.js (guix.controller.prototype.doSearch): Reset currentPageIndex to 0. --- js/guix-packages.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/guix-packages.js') 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) { -- cgit v1.2.3