I\'m working with Angular Material\'s matAutocomplete component, and according to the docs, there is a method which can open/close an autocomplete panel with a openPanel()/c
Please add stopPropagation or defer the openPanel using setTimeout as follows.
Because at button click end focus changes from input field back to ur button so autocomplete is hiding immediately
Option 1: Stop Propagatioan
...
openAutocomplete(evt) {
evt.stopPropagation()
this.autoTrigger.openPanel();
}
Option 2 - SetTimeout
openAutocomplete() {
setTimeout(() => {
this.autoTrigger.openPanel();
}, 0)
}