Specific condition

how to make condition if form search value true then refresh disabble and if form search value true funtion doInfinite automaticly load more data correct value, so i mean not load a default data again

  initializeItems() {
    this.authService.loker().then((result) => {
      this.items = result;
    }, (err) => {
      this.presentToast(err);
    });
  }

  getItems(ev: any) {
    if(ev.data == null) {
      this.initializeItems();
    }
    let val = ev.target.value;
    if (val && val.trim() != '') {
      this.items = this.items.filter((item) => {
        return (item.title.toLowerCase().indexOf(val.toLowerCase()) > -1);
      });
    }
  }

  doRefresh(refresher) {
    setTimeout(() => {
      this.initializeItems();
      refresher.complete();
    }, 2000);
  }

  doInfinite(infiniteScroll) {
     setTimeout(() => {
       this.getLoker();
       infiniteScroll.complete();
     }, 500);
   }