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

[Docs] Improve ScrollView documentation #1410

Closed
brentvatne opened this issue May 26, 2015 · 14 comments
Closed

[Docs] Improve ScrollView documentation #1410

brentvatne opened this issue May 26, 2015 · 14 comments
Assignees
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.

Comments

@brentvatne
Copy link
Collaborator

    automaticallyAdjustContentInsets: PropTypes.bool, // true
    contentInset: EdgeInsetsPropType, // zeros
    contentOffset: PointPropType, // zeros
    onScroll: PropTypes.func,
    onScrollAnimationEnd: PropTypes.func,
    scrollEnabled: PropTypes.bool, // true
    scrollIndicatorInsets: EdgeInsetsPropType, // zeros
    showsHorizontalScrollIndicator: PropTypes.bool,
    showsVerticalScrollIndicator: PropTypes.bool,
    style: StyleSheetPropType(ViewStylePropTypes),
    scrollEventThrottle: PropTypes.number, // null
@brentvatne brentvatne self-assigned this May 26, 2015
@brentvatne
Copy link
Collaborator Author

Also, when using onScroll, I receive this warning:

Warning: Don't set .props.onScroll of the React component <ScrollView />. Instead, specify the correct value when initially creating the element or use React.cloneElement to make a new element with updated props. The element was created by OrganizationProfileScreen.

Just based off of this

<ScrollView style={{backgroundColor: 'white', flex: 1, borderWidth: 0}} onScroll={this._onScroll}>
</ScrollView>

@brentvatne
Copy link
Collaborator Author

onScrollAnimationEnd doesn't seem to fire for horizontal scrolls

edit: need to use onMomentumScrollEnd - onScrollAnimationEnd refers to the incorrect event type and updating that does not fix it even

@brentvatne
Copy link
Collaborator Author

Might be useful to have a way to get the current contentOffset - just as we can access the contentSize

@brentvatne
Copy link
Collaborator Author

Note: this is a bit of a braindump right now from working with ScrollView, will cleanup when I'm done

@christopherdro
Copy link
Contributor

👍 I posted these issues a few weeks ago while working on the calendar.
Was looking for confirmation that it wasn't working.

@brentvatne brentvatne assigned brentvatne and unassigned brentvatne May 27, 2015
@brentvatne brentvatne changed the title Many ScrollView propTypes missing docstrings Improve ScrollView documentation May 28, 2015
@brentvatne brentvatne changed the title Improve ScrollView documentation [Docs] Improve ScrollView documentation May 28, 2015
@TYRONEMICHAEL
Copy link

+1. I noticed other developers were using the following as well, which is not documented:

  • onScrollBeginDrag
  • onMomentumScrollEnd

@brentvatne brentvatne added the Good first issue Interested in collaborating? Take a stab at fixing one of these issues. label Jun 18, 2015
@ghost
Copy link

ghost commented Aug 5, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@sheki
Copy link

sheki commented Aug 16, 2015

This is a bit of a blocker. Can we have an estimate of when this will be looked into and fix will be released.

@stereodenis
Copy link
Contributor

@facebook-github-bot-8 we are waiting

@brentvatne
Copy link
Collaborator Author

@sheki @stereodenis - you can upvote this on ProductPains - https://productpains.com/post/react-native/improve-scrollview-documentation/ - or if you are up for it, it would be great for you to have you look into the props and add some documentation yourself :)

@drpiou
Copy link

drpiou commented Oct 20, 2016

After one year, onMomentumScrollEnd is still undocumented. Thanks for your investigations.

@gavinlynch
Copy link

Thanks for onMomentumScrollEnd, ran into the same issue

@lesniakania
Copy link

I had the same issue. Thanks for this thread!

@pcottle
Copy link
Contributor

pcottle commented Jan 23, 2017

onMomentumScrollEnd was a life saver, this should really get added to the docs! Glad Google indexed this thread :)

@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

10 participants