Hi,
I have a 'kendo-autocomplete' control on my app. Trying to set auto focus (element highlighted) on page load. Using native javascript was able to track down the HTML element , but cannot fire 'click' / 'focus' events on them. Can you please help ?
I have seen a jquery post achieving the same , by calling .data('kendo-autocomplete). https://stackoverflow.com/questions/17152915/setting-focus-on-autocomplete-textbox
Here's what I tried ->
1. let searchInput: HTMLElement = document.getElementsByClassName('customClass')[0] as HTMLElement;
searchInput.click(); //doesn't fire
2. Native Angular way -> Doesn't even find the element on DOM.
<kendo-autocomplete #findMe>
@ViewChild('findMe') searchInput: ElementRef;
ngAfterViewInit() {
this.searchInput.nativeElement.focus(); //searchInput is not defined.
}