Searchbar doesn't update after changing input


#1

i have implemented search bar and it’s working but when i change the input doesn’t return anything
html

<ion-searchbar *ngIf="isSearchbarOpened" 
  ShowCancelButton="true" (ionClear)="onCancel($event)" (ionInput)="getClinc($event)"
  (ionCancel)="isSearchbarOpened=false"
      animated="true"></ion-searchbar>

    <ion-buttons end>
      <button ion-button end *ngIf="!isSearchbarOpened" (click)="isSearchbarOpened=true">
        <ion-icon class="search-icon" name="ios-search"></ion-icon>
      </button>
    </ion-buttons>

ts file

    getClinc(ev: any) {
      // console.log(ev)
      this.initializeItems();
      var val = ev.target.value;
      if (val && val.trim() != '') {
        this.Clinics = this.Clinics.filter((Clinic => {
          return (Clinic.name.toLowerCase().indexOf(val.toLowerCase()) > -1);

        }))
        

      } else {
        
      }
    }

#3

Como tiene la estructura de los datos?


#4

object array from get api