Only when the user lifts a finger, is it necessary to update him

I am using Refresher with Ionic 3app.It works fine. But now I have a requirement, when , only when the user lifts his finger, should be updated, if not, then the update action is canceled . Do you know how to implement such functionality?

.html

 <ion-refresher (ionRefresh)="getData($event)">
    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh" 
     refreshingSpinner="circles" refreshingText="Refreshing...">
    </ion-refresher-content>
  </ion-refresher>

.ts

getData(refresher?: any) {
  Observable.forkJoin([myTopicApi, myarticlApi, myPicksAPi])
      .subscribe(res => {
        if (refresher) { refresher.complete(); }//terminate refresher
      },
      error => {
        if (refresher) { refresher.complete(); }
      },
      () => { if (refresher) { refresher.complete(); } }
      )
}
+4
source share

Source: https://habr.com/ru/post/1680525/


All Articles