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

added ref support for picker/datepicker components #69

Merged
merged 8 commits into from Oct 25, 2021

Conversation

mcabs3
Copy link

@mcabs3 mcabs3 commented Oct 20, 2021

Hi, I appreciate what you have done for this library.

I (and my team) are trying to setup the ability to use a ref with your picker components

We need it so a form can press next and automatically open the picker. This PR has been tested locally to give us the functionality. I hope you can review and version bump npm soon :) let me know if you have any questions

@mcabs3 mcabs3 changed the title added ref for picker component added ref support for picker/datepicker components Oct 20, 2021
@thodubois
Copy link
Owner

Wow, thank you for this. I'll check today an see if this is fine =)

@mcabs3
Copy link
Author

mcabs3 commented Oct 22, 2021

Thanks, Let me know if I missed something!

I did notice that in RN 0.64 (I think) there is a bug with the internal lib you use (posted below). The way we were able to work around it was disabling the picker disabled={true} and using a ref and wrapper component to mimic the prop functionality of opening and closing the component.

react-native-picker/picker#237
facebook/react-native#31245

}
onClose && onClose();
}
// Only execute when show changes
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@thodubois thodubois merged commit 6e2bb09 into thodubois:master Oct 25, 2021
@thodubois
Copy link
Owner

Hello, this should be available on 0.3.11 =)
Thanks again for your time!

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.

None yet

3 participants