From 7ae4cbb61c2fea98f36da8f4096ffb279ccb5c2d Mon Sep 17 00:00:00 2001 From: Jane Sandberg <sandbej@linnbenton.edu> Date: Mon, 8 Jul 2019 07:03:50 -0700 Subject: [PATCH] LP1830432: Use a stub callback with registerOnTouched Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Bill Erickson <berickxx@gmail.com> --- .../src/app/share/org-family-select/org-family-select.component.html | 4 ++-- .../src/app/share/org-family-select/org-family-select.component.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.html b/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.html index 31347512a8..b9bdf0281c 100644 --- a/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.html +++ b/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.html @@ -12,14 +12,14 @@ <div class="form-check" *ngIf="!hideAncestorSelector"> <input type="checkbox" formControlName="includeAncestors" - (blur)="registerOnTouched()" + (blur)="propagateTouch()" class="form-check-input" id="{{domId}}-include-ancestors"> <label class="form-check-label" for="{{domId}}-include-ancestors" i18n>+ Ancestors</label> </div> <div class="form-check" *ngIf="!hideDescendantSelector"> <input type="checkbox" formControlName="includeDescendants" - (blur)="registerOnTouched()" + (blur)="propagateTouch()" class="form-check-input" id="{{domId}}-include-descendants"> <label class="form-check-label" for="{{domId}}-include-descendants" i18n>+ Descendants</label> </div> diff --git a/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.ts b/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.ts index 3e1e6e8e34..bf10232712 100644 --- a/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/org-family-select/org-family-select.component.ts @@ -61,6 +61,7 @@ export class OrgFamilySelectComponent implements ControlValueAccessor, OnInit { familySelectors: FormGroup; propagateChange = (_: OrgFamily) => {}; + propagateTouch = () => {}; constructor( private auth: AuthService, @@ -138,7 +139,9 @@ export class OrgFamilySelectComponent implements ControlValueAccessor, OnInit { this.propagateChange = fn; } - registerOnTouched() {} + registerOnTouched(fn) { + this.propagateTouch = fn; + } disableAncestorSelector(): boolean { return this.options.primaryOrgId === this.org.root().id(); -- 2.11.0