@marcwadai wrote:
This issue is the same as described herehttps://github.com/ionic-team/ionic/issues/12307
Since migration to ionic 3.5.2 the pipe on an virtual scroll is not working anymore. (it was working before)
The items in the virtual scroll are not updated but the filtered function works well and return the good values.My filter looks like this :
@Pipe({ name: 'RentalPipe' }) export class RentalFilter { transform(value, args?) { if (value.length > 0){ let rental = (args) ? args : {id :"all"}; console.log("rental filtered", rental); if (rental.id == "all"){ return value; }else{ let filtered = value.filter(one => { return one.rental.id == rental.id; }); console.log("filtered", filtered); return (filtered) ? filtered : []; } }else{ return []; } } }
and in the component :
<ion-list [virtualScroll]="bookingList | RentalPipe:selectedDisplay" [approxItemHeight]="'150px'"> items ... </ion-list
Posts: 1
Participants: 1