From: Jason Etheridge Date: Sun, 5 Mar 2023 18:40:31 +0000 (-0500) Subject: lp1993824: grids bug fix; disabled attribute on eg-grid-toolbar-action X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e364f2124b13959d96af505200eabdf7823bedbb;p=working%2FEvergreen.git lp1993824: grids bug fix; disabled attribute on eg-grid-toolbar-action Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts index 6982525527..213e150b75 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-action.component.ts @@ -24,7 +24,9 @@ export class GridToolbarActionComponent implements OnInit { @Input() action: (rows: any[]) => any; @Input() set disabled(d: boolean) { - this.toolbarAction.disabled = d; + if (this.toolbarAction) { + this.toolbarAction.disabled = d; + } } get disabled(): boolean { return this.toolbarAction.disabled; diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-menu.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-menu.component.ts index 87f4c2c240..a5a578e42d 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-menu.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-menu.component.ts @@ -27,6 +27,9 @@ export class GridToolbarActionsMenuComponent { } shouldDisable(action: GridToolbarAction): boolean { + if (action.disabled) { + return true; + } if (action.disableOnRows) { return action.disableOnRows(this.gridContext.getSelectedRows()); }