modal clear on close
This commit is contained in:
@@ -569,15 +569,14 @@ class ModalView extends View {
|
||||
*/
|
||||
actionCancel() {
|
||||
this.trigger('cancel');
|
||||
this.dialog.close();
|
||||
this.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* A `close` action.
|
||||
*/
|
||||
actionClose() {
|
||||
this.trigger('cancel');
|
||||
this.dialog.close();
|
||||
this.actionCancel();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -585,6 +584,16 @@ class ModalView extends View {
|
||||
*/
|
||||
close() {
|
||||
this.dialog.close();
|
||||
|
||||
if (!this.getParentView()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const key = this.getParentView().getViewKey(this);
|
||||
|
||||
if (key) {
|
||||
this.getParentView().clearView(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user