-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Closed
Labels
Description
Bug Report
Ionic version:
[x] 5.x
Current behavior:
It does not have setFocus method when you access ion-input element as ionInput;
@ViewChild('testInput', {read: IonInput}) testInput: IonInput;
ngAfterViewInit(): void {
console.log((this.testInput as IonInput))
console.log((this.testInput as IonInput).setFocus())
}
output:
IonInput {z: {…}, el: {…}, ionInput: {…}, ionChange: {…}…}
el: r
ionBlur: Observable
ionChange: Observable
ionFocus: Observable
ionInput: Observable
z: NgZone
Expected behavior:
It should have setFocus() to invoke focus programmatically.
Steps to reproduce:
Related code:
https://stackblitz.com/edit/ionic-angular-v5-y2wscm?file=src%2Fapp%2Fapp.component.html
insert short code snippets here
Other information:
Ionic info:
5
Reactions are currently unavailable