From 1ea0735761cbece4a276d413759c046bef494d2d Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 7 Sep 2018 17:32:15 -0400 Subject: [PATCH] LP#1790169: ensure that the sort priority actually gets saved This is a WIP patch - there's still a problem with the saved sort priorities actually getting used when a grid is initalized. Signed-off-by: Galen Charlton Signed-off-by: Jason Etheridge Signed-off-by: Remington Steed Signed-off-by: Chris Sharp --- Open-ILS/src/eg2/src/app/share/grid/grid.ts | 2 +- Open-ILS/web/js/ui/default/staff/services/grid.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.ts index 600f815564..7835f454ab 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.ts @@ -321,7 +321,7 @@ export class GridColumnSet { const c: GridColumnPersistConf = {name : col.name}; if (col.align !== 'left') { c.align = col.align; } if (col.flex !== 2) { c.flex = Number(col.flex); } - if (Number(col.sort)) { c.sort = Number(c.sort); } + if (Number(col.sort)) { c.sort = Number(col.sort); } return c; }); } diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js index 8421cc11a2..c347e2e36f 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -256,6 +256,7 @@ angular.module('egGridMod', // link columns to scope after loadConfig(), since it // replaces the columns array. $scope.columns = grid.columnsProvider.columns; + grid.dataProvider.refresh(); }); // NOTE: grid.collect() is first called from link(), not here. @@ -463,7 +464,7 @@ angular.module('egGridMod', // No need to store col.visible, since that's implicit if (col.align != 'left') c.align = col.align; if (col.flex != 2) c.flex = col.flex; - if (Number(col.sort)) c.sort = Number(c.sort); + if (Number(col.sort)) c.sort = Number(col.sort); return c; }); -- 2.11.0