Angular Material mat-autocomplete: Cannot clear option list?

472 Views Asked by At

I have tried to delete all the items in the option list of mat-autocomplete by using the following approaches and similar ones, but although the value in the text field is cleared, the list items still present on the list. Ho can I completely clear this list?

this.inputControl[id].setValue(''); // clear via form control (it just clear input field)

this.filteredOptions = []; // clear via filteredOptions parameter of mat-autocomplete

this.options = []; // tried to set the option value to empty 

I also look at the API, but there is not such a kind of feature unfortunately :(

0

There are 0 best solutions below