Skip to content

Unify some code in the native picker dialog implementation #1368

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
Jun 21, 2021

Conversation

ethanshar
Copy link
Collaborator

Description

Unify the code that renders the inner WheelPicker inside the the dialog of the Picker (when passing useNativePicker).
We have a different implementation of the dialog per each platform but the content should be the same.

This PR is a preparation for JIRA WOAUILIB-1843

Changelog

Unify internal code of native picker (wheel picker)

Copy link
Contributor

@lidord-wix lidord-wix left a comment

Choose a reason for hiding this comment

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

Cool!
I left small comment :)

return renderNativePicker(this.props);
}
return (
<WheelPicker selectedValue={selectedValue} onChange={onValueChange} {...wheelPickerProps} testID={`${testID}.wheelPicker`}>
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need the selectedValue, onValueChange, and wheelPickerProps in the propTypes anymore :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, fixed

return renderNativePicker(this.props);
}
return (
<WheelPicker style={pickerStyle} selectedValue={selectedValue} onChange={onValueChange} testID={`${testID}.wheelPicker`}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, you don't need the selectedValue and onValueChange props

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@ethanshar ethanshar requested a review from lidord-wix June 21, 2021 07:56
@lidord-wix lidord-wix merged commit 080f6a1 into master Jun 21, 2021
@ethanshar ethanshar deleted the infra/unifyNativePickerCode branch April 18, 2022 09:01
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