You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
Hello! This plugin works perfect for all cases except for the one I'm going to describe.
I want to be able to fire the "refreshing" property programmatically whenever I want. For Android works perfect, but for iOS it doesn't work.
I'm using nativescript-vue and doing the following:
This is the view
<PullToRefreshref="pullToRefresh" @refresh="onRefresh"row="1"col="0"color="red"><ListViewfor="item in listOfItems" @itemTap="onTap"><v-template><Labeltext="item.text"/></v-template></ListView></PullToRefresh>
As you can see I'm getting the nativeView of pull to refresh and changing the refreshing property programatically. It works but on iOS the color I applied to the ActivityIndicator is lost. Now If I apply the same logic to a button that fires this last function then on iOS it doesn't work at all, the ListView won't scroll itself and it won't display the ActivityIndicator.
The text was updated successfully, but these errors were encountered:
seergiue
changed the title
Not working on iOS onLoaded
Not working on iOS onLoaded or programmatically
Apr 11, 2020
@seergiue You could just simply do that manually if your page is a ScrollView.
See this code example:
page.xml
<ScrollView id="shop-page" swipe="onSwipe">
page.ts
export function onSwipe(args: SwipeGestureEventData) {
if(args.direction === 8) {
//"swipe up - pull to refresh"
const view = <View>args.object;
const scrollView = view.page.getViewById("shop-page");//<-- enter your ScrollView Element here
const vm = view.page.bindingContext;
//vertical Offset must be negative
if(scrollView.get("verticalOffset") < 0) {
refreshViewElementFromObservable(vm);
}
view.page.bindingContext = vm;
}
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello! This plugin works perfect for all cases except for the one I'm going to describe.
I want to be able to fire the "refreshing" property programmatically whenever I want. For Android works perfect, but for iOS it doesn't work.
I'm using nativescript-vue and doing the following:
Page
tag that will fire once the page is loaded and the following function will handle the eventAs you can see I'm getting the nativeView of pull to refresh and changing the refreshing property programatically. It works but on iOS the color I applied to the
ActivityIndicator
is lost. Now If I apply the same logic to a button that fires this last function then on iOS it doesn't work at all, theListView
won't scroll itself and it won't display theActivityIndicator
.The text was updated successfully, but these errors were encountered: