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

fix missing dialog props (such as onShow) #1715

Merged
merged 5 commits into from Dec 14, 2021
Merged

Conversation

mendyEdri
Copy link
Contributor

Description

Fix missing spread props pickerModalProps passed to Picker

Changelog

Fix missing pickerModalProps props spread passed to Picker

@@ -247,7 +247,7 @@ class Dialog extends Component<DialogProps, DialogState> {

render = () => {
const {modalVisibility} = this.state;
const {testID, supportedOrientations, accessibilityLabel, ignoreBackgroundPress} = this.props;
const {testID, supportedOrientations, accessibilityLabel, ignoreBackgroundPress, ...others} = this.props;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be done with modalProps:

  /**
   * Additional props for the modal.
   */
  modalProps?: ModalProps;

Copy link
Collaborator

Choose a reason for hiding this comment

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

@M-i-k-e-l
We are currently declaring that Dialog props are extending Modal props. (code wise, we don't do it)
If you want to go with adding modalProps which I agree is safer, we should fix the component typings as well

Copy link
Contributor

Choose a reason for hiding this comment

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

We have a Pick from ModalPropsIOS, or did I miss something? Generally we should remove that if we're adding the suggested prop, but I don't think it's worth the migration since we're going to move to the new Dialog soonish.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

@mendyEdri mendyEdri added the Important for Next Release PR that must be included in the release version label Dec 12, 2021
Copy link
Contributor

@M-i-k-e-l M-i-k-e-l left a comment

Choose a reason for hiding this comment

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

Please run npm run build:dev 🙏
And it has conflicts :/

@mendyEdri
Copy link
Contributor Author

Please run npm run build:dev 🙏 And it has conflicts :/

Fixed the conflict.
The ts errors are not related to the this code, for example react-freeze is missing

@M-i-k-e-l M-i-k-e-l merged commit 54f4907 into master Dec 14, 2021
@mendyEdri mendyEdri deleted the fix/picker-spread branch December 27, 2021 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Important for Next Release PR that must be included in the release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants