When autocomplete is inside a NgActiveModal, I am unable to use the SelectItem to set the default option. The completer is never initialized and I see the following error in the console
I have tried putting the last line of code into ngOnInit, ngAfterContentInit, & ngAfterViewInit. Even when I wrote a custom function to check if the element was visible first, then run the SelectItem...it still throws the error
When autocomplete is inside a NgActiveModal, I am unable to use the SelectItem to set the default option. The completer is never initialized and I see the following error in the console
@ViewChild(NgAutocompleteComponent) public offerType: NgAutocompleteComponent;
public offerTypeOpts = [ CreateNewAutocompleteGroup( 'Select', 'offerType', [ {title: 'Standalone', id: 'Standalone'}, {title: 'ABN', id: 'ABN'} ], {titleKey: 'title', childrenKey: null }, '', false ), ];
this.offerType.SelectItem('offerType', 'Standalone');
I have tried putting the last line of code into ngOnInit, ngAfterContentInit, & ngAfterViewInit. Even when I wrote a custom function to check if the element was visible first, then run the SelectItem...it still throws the error