Comments (8)
I can test it, but not very soon because I'm away. I'll try to give a feedback by tomorrow.
But that's correct, I can't scroll to the top of the page because when I try to do it, it activate the pull to refresh
.
I'll try to play around with your tips and see if I can work around this. Not a big issue.
from nativescript-pulltorefresh.
Running into same issue. When using it with ScrollView or ListView, when trying to scroll back to the top it will refresh the page, ven when touching the screen at the very bottom. I'm using it with angular as well.
But I noticed it only happens when using with more layout definitions. For example, the code below works as expected:
<PullToRefresh (refresh)="refreshPage($event)">
<ListView [items]="itemList" *ngIf="itemList.length > 0">
<ng-template let-item="item">
<Label [text]="item.name"></Label>
</ng-template>
</ListView>
</PullToRefresh>
However, this code here doesn't:
<PullToRefresh (refresh)="refreshPage($event)">
<FlexboxLayout flexDirection="column">
<ListView [items]="itemList" *ngIf="itemList.length > 0">
<ng-template let-item="item">
<Label [text]="item.name"></Label>
</ng-template>
</ListView>
<Label text="Some other content"></Label>
</FlexboxLayout>
</PullToRefresh>
Since there isn't much in the docs, I don't know if this is the expected behavior or if needs to fix something.
from nativescript-pulltorefresh.
The thing about iOS is that unlike Android you cannot use the pull to refresh functionality on any view, because the whole UI thing is rendered in UIScrollView
. On Android it is just a separate UI element that is rendered at the top of any view, so it is independent. That's why for iOS the content of the pull to refresh needs to be a descendant of UIScrollView
. In terms of {N} this means that inside the PullToRefresh
you must have ScrollView
or ListView
. Also works with some plugins - for example my GridView
plugin.
from nativescript-pulltorefresh.
I think this mainly affects iOS correct? I recall having to adjust layouts for iOS to work. This line is all I recall, maybe @PeterStaev can provide some insight on the specifics here for iOS 😄
I don't recall having any layout issues with Android but it's been awhile since I've used this one.
from nativescript-pulltorefresh.
For me this was happening on Android, I can't test it on IOS since I don't own one. Also, like I said, it only has a different behavior under the second template structure, and the pull refresh does work, but it blocks the scroll to top.
from nativescript-pulltorefresh.
Realized I forgot to paste the line from the iOS file like 😄 @PeterStaev but thanks for chiming in on the iOS specifics. @celsomtrindade when you say it blocks the scroll to top
you mean you can't scroll back to the top of the list, correct? Does it work with a StackLayout
instead of FlexboxLayout
? Maybe wrap the Listview and label inside a ScrollView
🤔 just some thing I would try if I was working on this. Let me know if you can try any of those and report any findings back. Thanks 😄
from nativescript-pulltorefresh.
- 1 any workaround for this ? i'm also using scrollview
from nativescript-pulltorefresh.
Hi guys, looks like this is still a problem. It works fine with Repeater and RadListView, but does not with ListView. I did not find any workaround. I m thinking to try with checking scroll position (check this out for idea: https://www.youtube.com/watch?v=k9cxGlAlo4s&t=1029s). All we need is to check scroll position and enable or disable plugin.
Scroll Up get's locked. You need to start scrolling down and than just change direction while you keep the finger on the screen. Looks like that it can't get actual scroll position.
from nativescript-pulltorefresh.
Related Issues (20)
- Indicator Color HOT 2
- Conditionnnal blocked plugin
- color and backgroundColor property applies to content element GridLayout HOT 1
- Fails to build on Android for Nativescript 6.0.0 HOT 1
- app:runsbg after updating to nativescript 6 HOT 1
- Not working with webview on android, for ios works fine HOT 5
- iOS bounce up on refresh and no animation HOT 10
- Class not found android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener HOT 3
- Android ViewPager2 increased sensitivity HOT 2
- Not working on iOS onLoaded or programmatically HOT 2
- Changelog for 2.0.0 ?
- Wrong version being downloaded by default HOT 2
- exception with version 3 HOT 8
- Cannot read property 'SwipeRefreshLayout' of undefined HOT 2
- How to prevent pull to refresh when dragging down on Google Maps? HOT 1
- Cannot access 'PullToRefresh' before initialization HOT 3
- FR: add api to show refreshing-indicator by script
- NativeScript 7 Support HOT 2
- tns plugin add @nstudio/[email protected] HOT 1
- Move to community HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-pulltorefresh.