LP1625192 Filtering Grid refreshes to 1st Page
authorMike Risher <mrisher@catalyte.io>
Tue, 12 Jan 2021 20:46:55 +0000 (20:46 +0000)
committerJason Boyer <JBoyer@equinoxOLI.org>
Sun, 5 Mar 2023 18:22:01 +0000 (13:22 -0500)
Modify the old DOJO grid so that when you filter the grid it resets
to the first page.

Signed-off-by: Mike Risher <mrisher@catalyte.io>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Open-ILS/web/js/dojo/openils/widget/AutoGrid.js

index 8936338..fa8b0f2 100644 (file)
@@ -130,7 +130,6 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
                                         self.filterDialog.onApply = function(filter) {
                                             if (self.urlNavigation) {
                                                 self.applyAndExecuteUrlOps(0, filter);
-
                                             } else {
                                                 self.cachedQuerySearch = filter;
                                                 self.resetStore();
@@ -139,6 +138,8 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
                                                     self.cachedQuerySearch,
                                                     true
                                                 );
+                                                self.cachedQueryOpts.offset = self.displayOffset = 0;
+                                                self.refresh();
                                             }
                                         };