Closed chrisj-au closed 5 years ago
I am probably not implementing this correctly but when specifying the allow clear, it only works once the initial value has changed. E.g. page loads, can't clear, change the value in the select, then I can clear. Thanks!
<ngx-select [items]="userSearch" [allowClear]="true"> ngOnInit() { if (this.existingObject) { // Input adobject provided this.adsearch.getADObjects(this.existingObject.name) .subscribe(r => { this.userSearchFG.controls['ctrlUserSearch'].patchValue(r[0]); this.userSearch = r; }); } }
@chrisjau Have you checked the demo: https://optimistex.github.io/ngx-select-ex/ If the demo does not help you, so make an example to demonstrate the behavior there: https://stackblitz.com/
I am probably not implementing this correctly but when specifying the allow clear, it only works once the initial value has changed. E.g. page loads, can't clear, change the value in the select, then I can clear. Thanks!