Using the Angular 2 Dropdowns, how can I programmatically set focus to it? the examples show how to get the focus event, but not how to set focus.
thanks
Let's assume your dropdowns are select, for i don't know what a kendo dropdown is. Start by creatign a local variable :
<select #dropdown></select>
In your component, get that variable reference :
@ViewChild() dropdown: ElementRef;
Now, you can trigger the focus with
this.dropdown.nativeElement.focus();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With