-import {Component, OnInit, AfterViewInit, Input, ViewChild} from '@angular/core';
+import {Component, OnInit, AfterViewInit, Input, ViewChild, ChangeDetectorRef} from '@angular/core';
import {empty, throwError, Observable, from} from 'rxjs';
import {map} from 'rxjs/operators';
import {Router, ActivatedRoute, ParamMap} from '@angular/router';
gridSource: GridDataSource;
@ViewChild('editDialog', { static: true }) editDialog: FmRecordEditorComponent;
- @ViewChild('providerContactAddresses', { static: true }) providerContactAddresses: ProviderContactAddressesComponent;
+ @ViewChild('providerContactAddresses', { static: false }) providerContactAddresses: ProviderContactAddressesComponent;
@ViewChild('acqProviderContactsGrid', { static: true }) providerContactsGrid: GridComponent;
@ViewChild('successString', { static: true }) successString: StringComponent;
@ViewChild('createString', { static: false }) createString: StringComponent;
constructor(
private router: Router,
private route: ActivatedRoute,
+ private changeDetector: ChangeDetectorRef,
private net: NetService,
private auth: AuthService,
private idl: IdlService,
(idlThing: IdlObject) => {
this.selectedContact = idlThing;
console.debug('selected contact',this.selectedContact);
+ // ensure that the contact address grid is instantiated
+ this.changeDetector.detectChanges();
this.providerContactAddresses.reloadGrid();
}
);