From 6f580f080869481664dd33d6e6c0db5f562e26d4 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 16 Mar 2021 12:10:25 -0400 Subject: [PATCH] LP1904036 Allow newlines/spaces in long field lists Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/grid/grid.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts index 49a4becd86..1bb94e9290 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts @@ -174,12 +174,17 @@ export class GridComponent implements OnInit, AfterViewInit, OnDestroy { this.context.ignoredFields = []; if (this.showFields) { + // Stripping spaces allows users to add newlines to + // long lists of field names without consequence. + this.showFields = this.showFields.replace(/\s+/g, ''); this.context.defaultVisibleFields = this.showFields.split(','); } if (this.hideFields) { + this.hideFields = this.hideFields.replace(/\s+/g, ''); this.context.defaultHiddenFields = this.hideFields.split(','); } if (this.ignoreFields) { + this.ignoreFields = this.ignoreFields.replace(/\s+/g, ''); this.context.ignoredFields = this.ignoreFields.split(','); } -- 2.11.0