如何將焦點設置到我的kendoui multiselect元素上,在view init(ngAfterViewInit)之後?將注意力集中在kendoui multiselect
在正常輸入元素我將焦點設置,如:
HTML:
<input #setFocus type="text" class="form-control" formControlName="code" id="code" />
組件:
@ViewChild('setFocus') focusElement: any;
...
ngAfterViewInit() {
if (this.focusElement) {
this.focusElement.nativeElement.focus();
}
}
感謝您的幫助!在他們的documentation
焦點|模糊支持的改進計劃 - https://github.com/telerik/kendo-angular/issues/335 。直到它被實現,您將需要使用一些在此給出的建議線。 –
感謝您的回答!我將等待焦點/模糊支持。 –