From: Galen Charlton Date: Fri, 7 Sep 2018 21:32:15 +0000 (-0400) Subject: LP#1790169: ensure that the sort priority actually gets saved X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c86e27e1cb32dc62d3e24b2ecbcf9bfc09c6519d;p=working%2FEvergreen.git 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 --- 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 ae681694d8..ed56a1086c 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.ts @@ -290,7 +290,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 9ee646a47c..e4e928bd9a 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. @@ -458,7 +459,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; });