Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

Can't disable element

$
0
0

@AdamGelineau wrote:

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:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles