Searchbar type

Hello!

I have a searchbar in my app, which I’m using to filter an email list. Therefore, I want its input type to be email (because then, on a mobile device the keyboard will have @ key by default).

I’ve searched the documentation and saw that there is a type property on the searchbar. However, neither of the code snippets below did change the input type

<ion-searchbar [(ngModel)]="email" (ionInput)="getContacts($event)" type="email" placeholder="email"></ion-searchbar>  
<ion-searchbar [(ngModel)]="email" (ionInput)="getContacts($event)" [type]="email" placeholder="email"></ion-searchbar>
1 Like

I tried and getting this issue as well.

  • @usage
  • <ion-searchbar
  • [(ngModel)]=“myInput”
  • [showCancelButton]=“shouldShowCancel”
  • (ionInput)=“onInput($event)”
  • (ionCancel)=“onCancel($event)”>

is don’t work.