Can't disable ion-searchbar element

#1

Hi guys,

How can i disable a searchbar element ?

Here’s what I wanna do:

<ion-searchbar
          [ngClass]="searchbarClass"
          placeholder="Some placeholder"
          [(ngModel)]="searchtext"
          (focus)="onFocus()"
          autocorrect="on"
          type="text"
          (keyup.enter)="closeKeyboard()"
          [disabled]="select.length > 0"
  ></ion-searchbar>

But it doesn’t work, my search bar is always enabled even if I select some element in my select box…

So, I tried this to:

<ion-searchbar
          [ngClass]="searchbarClass"
          placeholder="Some placeholder"
          [(ngModel)]="searchtext"
          (focus)="onFocus()"
          autocorrect="on"
          type="text"
          (keyup.enter)="closeKeyboard()"
          [disabled]="true"
  ></ion-searchbar>

But it doesn’t work either :confused: