(beta-3) infinite won't fire after list has been re-populated?


#1

Hello,
I have a classic search - result scenario where I want to use infinite scrolling. The first time the list is populated everything runs smoothly, the second time around however (infinite) won’t fire.

I’m sure I’m not seeing something, so apologies in advance. Here’s some code:

snippet from the template:

<ion-list>
    <ion-item *ngFor="#r of result | topFilter:until">
        {{r.foobar}}
    </ion-item>
</ion-list>

<ion-infinite-scroll (infinite)="doInfinite($event)">
   <ion-infinite-scroll-content></ion-infinite-scroll-content>
 </ion-infinite-scroll>

in the controller:

doInfinite(ev){
    this.until += 50;
    ev.complete();
 }

the pipe is simple:

export class TopPipe implements PipeTransform {
    transform(value:any, args:string[]): any {
        let filter = args[0];
        return filter && value ? value.slice(0, filter) : value;
    }
}

and of course when I get new results from the search, I do this before re-populating the result array:

  this.result = [];            
  this.until = 25;

Thank you!


#2

Sorry to bump but I’m pretty stuck. Anyone? Pretty please?


#3

@sphaso, did you manage to get this issue solve. I have the same problem. Thks.