1
votes

how to open mat-autocomplete panel on the (option-Selected) event of another mat-autocomplete

please refer the example here https://stackblitz.com/edit/angular-material-autocomplete-mqnxp5

1

1 Answers

0
votes

The problem with opening the other list from the selected event is that the event sequence for the first list is still in progress. Waiting until after is necessary, which is done using setTimeout():

onStateChanged(){
  setTimeout(() => {
    this.cityInput.openPanel();
  });
}