Friday, 24 May 2019

focusing ng-select filter input on drop down open

I'm using ng-select and have a custom filter header template defined which contains an input.

I would like the input to receive focus when the dropdown is opened for the select, but I cant figure out how to.

I have an example here -> https://stackblitz.com/edit/angular-playground-f57jog

I did try attaching to the ng-select (open) output and calling focus() on my input element, but this fails for me.

Whats the correct approach here? Thanks



from focusing ng-select filter input on drop down open

No comments:

Post a Comment