Skip to content

Fix/dialog on dismiss #755

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 5 commits into from
Apr 26, 2020
Merged

Fix/dialog on dismiss #755

merged 5 commits into from
Apr 26, 2020

Conversation

ethanshar
Copy link
Collaborator

  • Revert recent changes with onDismiss functionality
  • Add parity to Android with Modal's onDismiss callback that was supported only for iOS

Copy link
Collaborator

@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.

Did this cause bugs?

}
// Parity with iOS Modal's onDismiss
if (Constants.isAndroid) {
_.invoke(props, 'onModalDismissed', props);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel this is risky, a user could have counted on this not working on Android, and now it will, this is a big potential for bugs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as discussed, I added a new prop - onDialogDismissed

@ethanshar ethanshar requested a review from M-i-k-e-l April 26, 2020 12:28
@@ -59,9 +59,13 @@ class Dialog extends BaseComponent {
*/
useSafeArea: PropTypes.bool,
/**
* Called once the modal has been dissmissed (iOS only)
* Called once the modal has been dismissed (iOS only) - Deprecated, use onDialogDismissed instead
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to add a warning?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done ✔️

@ethanshar ethanshar requested a review from M-i-k-e-l April 26, 2020 15:16
Copy link
Collaborator

@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.

Added a check for onModalDismissed existence

@M-i-k-e-l M-i-k-e-l merged commit d54050c into master Apr 26, 2020
@ethanshar ethanshar deleted the fix/dialog_onDismiss branch May 17, 2020 07:16
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