Hi, I have one issue with combining ionic list component and swipe gestures.
So here is my html template:
`<div *ngIf="data" (swipe)="changeRange($event)">
<ion-list no-lines>
<ion-item *ngFor="let item of data" >
{{item}}
</ion-item>
</ion-list>
</div>
`
And my controller code
`@Component({
templateUrl: 'build/pages/template.html',
})
export class CoolPage {
public range:DateRange;
constructor(private nav:NavController, private navParams:NavParams, private dataService:DataService) {
this.dataService= dataService;
this.navParams = navParams;
this.nav = nav;
this.range = dataService.getRange();
}
ionViewDidEnter() {
/*SOME CODE HERE*/
}
changeRange(event) {
switch (event.direction) {
case SwipeDirection.LEFT:
/*SOME CODE HERE*/
break;
case SwipeDirection.RIGHT:
/*SOME CODE HERE*/
break;
}
this.doLoadData();
}
}
enum SwipeDirection {
LEFT = 2,
RIGHT = 4
}`
The issue is that after I applied (swipe) directive to my template ion-list scroll became broken. Any ideas how it can be done or fixed?
UPD:
I discovered that scroll becomes disabled when you add any of gestures above the list block.
UPD 2:
Don’t know if someone had this issue, but I discovered how it can be solved.
You should place gestures directives to ion-content, and if you places them to nested blocks of ion-content, scrolls becomes unavailable.