From 165a3180d526c09b6113fd4943a30bf02cb6fa57 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 2 Mar 2020 12:30:47 -0500 Subject: [PATCH] LP#1850547: eg-org-select: allow applyOrg[Id] to clear the org unit Sponsored-by: Evergreen Community Development Initiative Sponsored-by: Georgia Public Library Service Sponsored-by: Indiana State Library Sponsored-by: C/W MARS Signed-off-by: Galen Charlton Signed-off-by: Tiffany Little Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts index a800ab048d..1a11435558 100644 --- a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts @@ -97,17 +97,13 @@ export class OrgSelectComponent implements OnInit { // Modify the selected org unit via data binding. // This WILL NOT result in an onChange event firing. @Input() set applyOrg(org: IdlObject) { - if (org) { - this.selected = this.formatForDisplay(org); - } + this.selected = org ? this.formatForDisplay(org) : null; } // Modify the selected org unit by ID via data binding. // This WILL NOT result in an onChange event firing. @Input() set applyOrgId(id: number) { - if (id) { - this.selected = this.formatForDisplay(this.org.get(id)); - } + this.selected = id ? this.formatForDisplay(this.org.get(id)) : null; } // Limit org unit display to those where the logged in user -- 2.11.0