lp1790169 call compileSort after closing showColumnDialog user/rsteed/lp1790169_fix_grid_sort
authorJason Etheridge <jason@EquinoxInitiative.org>
Thu, 27 Jun 2019 22:15:50 +0000 (18:15 -0400)
committerRemington Steed <rjs7@calvin.edu>
Tue, 30 Jul 2019 15:44:14 +0000 (11:44 -0400)
or in other words, make Sort Priority work right away after configuring it

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Open-ILS/web/js/ui/default/staff/services/grid.js

index e4e928b..f6b9b6c 100644 (file)
@@ -1207,6 +1207,13 @@ angular.module('egGridMod',
                             }
                             $dialogScope.ok = $dialogScope.cancel = function() {
                                 delete $scope.lastModColumn;
+                                if (grid.columnsProvider.hasSortableColumn()) {
+                                    // only refresh the grid if the user has the
+                                    // ability to modify the sort priorities.
+                                    grid.compileSort();
+                                    grid.offset = 0;
+                                    grid.collect();
+                                }
                                 $uibModalInstance.close()
                             }
                         }