[英]ionic 2 ion-refresher always fired when pulling up after the on-refresh function triggered once
<ion-content class="orderFormHeader">
<ion-refresher (refresh)="doRefresh($event)">
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
<ion-list *ngIf="listData!=null&&listData.length>0">
<ion-item *ngFor="#obj of listData">
<orderitem [item]="obj"></orderitem>
</ion-item>
</ion-list>
</ion-content>
My code above. 我上面的代码。
At first,the listData
is null, doRefresh
will give more than 20 items into listData
. 首先,
listData
为null, doRefresh
将把20多个项目放入listData
。 you can pulling down smoothly. 您可以平稳地下拉。
But when you pulling up back, it FAR FROM THE TOP , 但是当您向后拉时,它从顶部消失 ,
The doRefresh
triggered, then the list jumpped to the TOP. 触发了
doRefresh
,然后列表跳至TOP。 You can't see any item mid of the list. 您看不到列表中的任何项目。
Chrome console warn: Chrome控制台警告:
Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
被忽略的尝试取消带有cancelable = false的touchmove事件的尝试,例如,因为滚动正在进行并且不能中断。
ionic CLI v2.0.0-beta.17 离子CLI v2.0.0-beta.17
im update ionic-framework to beta.2,the problem's gone~ 我将ionic-framework更新为beta.2,问题解决了〜
"ionic-framework": "2.0.0-beta.2"
thanks to my pro-matser 多亏了我的亲
THIS IS WHAT HE GAVE ME: 这就是他给我的:
https://github.com/driftyco/ionic/milestones Pull to refresh - bug fixes beta.2 https://github.com/driftyco/ionic/milestones拉动刷新-bug修复了beta.2
if anyone has this problem , plz UPDATE TO A UPPER VER~ 如果有人遇到此问题,请更新至更高版本!
check the list data show on the refresh. 检查刷新时显示的列表数据。 when you pull to refresh and set the list to [] (empty).
当您拉动刷新并将列表设置为[](空)时。 like myself here.
像我自己在这里。 set items to null and right after concat the item
将项目设置为null并紧接该项目后
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.