Skip to content

Fix/ WheelPicker onChange in Android #1301

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

Merged
merged 2 commits into from
May 18, 2021
Merged

Conversation

lidord-wix
Copy link
Contributor

Description

onMomentumScrollEnd not being called in Android - facebook/react-native#26661
Add a call for the onChange() callback manually.

Changelog

Fix inconsistent between iOS and Android by calling the onChange() function manually

Copy link
Collaborator

@ethanshar ethanshar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lidord-wix
I didn't dive into the code yet, but I noticed an issue with this fix.
See that now on Android, when selecting a different value using a click, it doesn't scroll to it, but immediately change the value.

@lidord-wix
Copy link
Contributor Author

@lidord-wix
I didn't dive into the code yet, but I noticed an issue with this fix.
See that now on Android, when selecting a different value using a click, it doesn't scroll to it, but immediately change the value.

Ohh I see..
Solved it with setTimeout - I'm not sure it's the best solution but I couldn't find another :)

@lidord-wix lidord-wix requested a review from ethanshar May 13, 2021 15:17
@ethanshar ethanshar merged commit fb9a81b into master May 18, 2021
@lidord-wix lidord-wix deleted the fix/scrollTo_for_Android branch May 31, 2021 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants