-
Notifications
You must be signed in to change notification settings - Fork 735
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
Conversation
ethanshar
commented
Apr 25, 2020
- Revert recent changes with onDismiss functionality
- Add parity to Android with Modal's onDismiss callback that was supported only for iOS
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.
Did this cause bugs?
src/components/dialog/index.js
Outdated
} | ||
// Parity with iOS Modal's onDismiss | ||
if (Constants.isAndroid) { | ||
_.invoke(props, 'onModalDismissed', props); |
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 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.
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.
as discussed, I added a new prop - onDialogDismissed
@@ -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 |
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.
Do we want to add a warning?
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 ✔️
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.
Added a check for onModalDismissed existence