Offsetting RefreshControl on iOS via progressViewOffset
See original GitHub issueDescription
An object class check for RefreshControl
is hard-coded into ScrollView
making it impossible to offset the pull-to-refresh loader via JS. Tinkering with the style
prop on RefreshControl
can cause crashes and strange visual artifacts. A native solution seems the only near-term viable option besides re-implementing everything from scratch.
I have a fix locally to make the Android-only property progressViewOffset
on RefreshControl
work on iOS as well.
I will submit a PR as soon as possible. Please reply here if there is any disinterest in resolving this issue by adding iOS support via progressViewOffset
Reproduction
- Start a project
- Set up a <ListView> component
- Add the
refreshControl={<RefreshControl progressViewOffset={-13}/>}
property. - Run in iOS simulator
- Pull-down while list is at top
- An activity indicator will slowly appear as you pull down.
The indicator does not move according to the progressViewOffset
property on RefreshControl
.
Additional Information
- React Native version: 0.36
- Platform: iOS 10.0
- Operating System: macOS 10.12.1
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Offsetting RefreshControl on iOS via progressViewOffset | Voters
property. Run in iOS simulator; Pull-down while list is at top; An activity indicator will slowly appear as you pull down. The indicator ......
Read more >ProgressViewOffset for IOS Refresh Control React Native
It's working fine on Android. But in IOS we have no support for offset. But I ended up using contentInset and contentOffset but...
Read more >[Solved]-How to offset the RefreshControl - appsloveworld
In android you can use parameter 'progressViewOffset' to a value to achieve the same. <RefreshControl refreshing={this.state.isRefreshing} onRefresh={this.
Read more >RefreshControl - React Native
This component is used inside a ScrollView or ListView to add pull to refresh functionality. When the ScrollView is at scrollY: 0 ,...
Read more >React Native Pull-to-Refresh: Make Refreshing Easy for Users
While using RefreshControl, you'll need to handle the state of the component. ... progressViewOffset: the top offset of the progress view.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Bonobomagno happy to re-open the issue if you are ready to send a PR.
This is a very usefull feature, why it has not be merged till now ? @scarlac @brentvatne