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's 'contentOffset' does not use a "scrolling" effect when reaching the target "Y". #6219

Closed
afilp opened this issue Mar 1, 2016 · 4 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@afilp
Copy link

afilp commented Mar 1, 2016

I am using the contentOffest prop in ScrollView (on latest React Native, 0.20), in order to show different sections of the ScrollView content depending on which button the user presses.

The shifting works, no problem with that, but it goes to the related "Y" instantly, not with the same "scrolling" effect it would use when we scroll with the finger.

Can this be fixed somehow?

Thanks.

@jaredly
Copy link
Contributor

jaredly commented Mar 1, 2016

You want to search for "animate scrolling javascript" or something like that. StackOverflow would be a great place for this question if you are unable to find an answer

@brentvatne
Copy link
Collaborator

You can just use scrollTo - https://github.com/facebook/react-native/blob/master/Libraries/Components/ScrollView/ScrollView.js#L365-L387

It would be nice to add this to our docs :)

@brentvatne
Copy link
Collaborator

@facebook-github-bot answered

@facebook-github-bot
Copy link
Contributor

Closing this issue as @brentvatne says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Mar 6, 2016
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 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
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants