Prevent hide animation when opening modal from other modal

This commit is contained in:
Alexander Skvortsov 2020-09-25 12:54:03 -04:00
parent 7fc0963e3c
commit b7593bc6a8

View File

@ -27,9 +27,14 @@ export default class Modal extends Component {
this.attrs.onshow(() => this.onready());
}
onremove() {
onbeforeremove() {
// If the global modal state currently contains a modal,
// we've just opened up a new one, and accordingly,
// we don't need to show a hide animation.
if (!app.modal.modal) {
this.attrs.onhide();
}
}
view() {
if (this.alertAttrs) {
@ -107,7 +112,7 @@ export default class Modal extends Component {
* Hide the modal.
*/
hide() {
this.attrs.onhide();
app.modal.close();
}
/**