We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d898574 commit c37d813Copy full SHA for c37d813
Libraries/Modal/Modal.js
@@ -169,13 +169,10 @@ class Modal extends React.Component<Props> {
169
};
170
}
171
172
- componentWillUnmount() {
173
- if (this.props.onDismiss != null) {
+ UNSAFE_componentWillReceiveProps(nextProps: Props) {
+ if (!nextProps.visible && this.props.visible && this.props.onDismiss) {
174
this.props.onDismiss();
175
176
- }
177
-
178
- UNSAFE_componentWillReceiveProps(nextProps: Props) {
179
Modal._confirmProps(nextProps);
180
181
0 commit comments