-
Notifications
You must be signed in to change notification settings - Fork 734
Support useWheelPicker in Picker component #2100
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
Conversation
@@ -137,7 +137,8 @@ export default class PickerScreen extends Component { | |||
<Picker | |||
title="Native Picker" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the title too. Also, don't you want to keep both examples for native and wheel pickers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I want to deprecate useNativePicker, you mean for the sake of sanity checks - to see nothing was broken with useNativePicker prop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, if you're deprecating the 'useNativePicker' now there's no point having its example (but the title should be changed to avoid confusion).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/components/picker/index.tsx
Outdated
@@ -190,6 +197,8 @@ const Picker = (props: PropsWithChildren<PickerProps> & ForwardRefInjectedProps | |||
return ( | |||
<PickerItemsList | |||
testID={`${testID}.modal`} | |||
useWheelPicker={useWheelPicker} | |||
items={items} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you pass 'items' only if 'useWheelPicker' is true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add a condition, but it doesn't really matter or affect the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to secure no side-effects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Description
Support useWheelPicker in Picker component
This should replace useNativePicker implementation
Changelog
Support useWheelPicker prop in Picker component in order to render a wheel picker component