Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollView rendered incorrectly with RefreshControl if push back a bit before finish refreshing #10747

Closed
nihgwu opened this issue Nov 4, 2016 · 6 comments
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@nihgwu
Copy link
Contributor

nihgwu commented Nov 4, 2016

rc
to reproduce:
Open the RefreshControl example in UIExplorer for iOS, pull to refresh and then push back a bit(not hide the RefreshControl) before turning off refreshing, and you will see the issue every time with the latest code in master branch of React Native, the ScrollView bounces back with a space for RefreshControl witch is already disappeared instead of scroll to the top

@brentvatne brentvatne added the Platform: iOS iOS applications. label Nov 6, 2016
@tsteele2013
Copy link

Having the same issue described by @nihgwu in my ListView. If I scroll down while the refresh is still processing, the space for the RefreshControl is still being rendered, which pushes down my stickyHeader and makes things look quite ugly.

The Today sectionHeader should be directly underneath the StatusBar.

img_4426

@kylekampy
Copy link

My team has been encountering the same issue:

screen shot 2017-01-23 at 3 13 09 pm

Corresponding render code snippet looks like:

return (
  <ListView
    style={styles.listView}
    dataSource={dataSource}
    renderRow={renderRow}
    renderSeparator={renderSeparator}
    renderSectionHeader={renderSectionHeader}
    onEndReached={this.loadMoreAppointments}
    onEndReachedThreshold={800}
    initialListSize={appointments.length}
    refreshControl={refreshControl}
  />
);

With RefreshControl being a simple:

<RefreshControl
  refreshing={loadingAppointments}
  onRefresh={this.handleRefresh}
  tintColor={'#01A191'}
  title={'Loading...'}
  titleColor={'#01A191'}
  colors={['#01A191', '#41CFBD']}
  progressBackgroundColor={'#FFFFFF'}
/>

When this #11700 makes it into a release, we are debating just disabling section sticky headers (or just rendering them as normal rows now to disable them).

Finally, just to add some more context; it does appear there was an intentional commit a while back to resolve this issue: 34389c5.

@stief510
Copy link

+1

2 similar comments
@VansonLeung
Copy link

+1

@MataHu
Copy link

MataHu commented Apr 28, 2017

+1

vonovak added a commit to vonovak/react-native that referenced this issue Jun 6, 2017
rename defualtHeight to _initialHeight, fix facebook#10747
vonovak added a commit to vonovak/react-native that referenced this issue Jul 16, 2017
set the y offset to 0, since 0 offset is where we want to be after we hide the refreshControl
@hramos hramos added the Icebox label Jul 20, 2017
@hramos
Copy link
Contributor

hramos commented Jul 20, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos closed this as completed Jul 20, 2017
facebook-github-bot pushed a commit that referenced this issue Nov 8, 2017
Summary:
set the y offset to 0, since 0 offset is where we want to be after we hide the refreshControl.

Tested in emulator with ios 8, 9, 10 and also with section headers.
Closes #15033

Differential Revision: D6265930

Pulled By: shergin

fbshipit-source-id: b249c4713de68fc6b3a32cee7f995dc352315970
cdlewis pushed a commit to cdlewis/react-native that referenced this issue Nov 19, 2017
Summary:
set the y offset to 0, since 0 offset is where we want to be after we hide the refreshControl.

Tested in emulator with ios 8, 9, 10 and also with section headers.
Closes facebook#15033

Differential Revision: D6265930

Pulled By: shergin

fbshipit-source-id: b249c4713de68fc6b3a32cee7f995dc352315970
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants