Ion-Searchbar - hide clear button

Hi,

Is it possible to hide the clear button in the ion-searchbar component. I am getting an issue because of that button and I would like to hide it.

Thank you.

2 Likes

I think you can try:
.searchbar-clear-icon {
display: none !important;
}

1 Like

This is not working on Ionic 5.

1 Like
ion-searchbar {

  ::ng-deep {

    .searchbar-clear-icon {

      display: none !important;

    }

  }

}