mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Deleting the object (model & nested model/collection) during showing
the node properties.
This commit is contained in:
@@ -594,6 +594,23 @@
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
remove: function(opts) {
|
||||
if (opts && opts.data) {
|
||||
if (this.model) {
|
||||
if (this.model.reset) {
|
||||
this.model.reset();
|
||||
}
|
||||
this.model.clear({silent: true});
|
||||
delete (this.model);
|
||||
}
|
||||
if (this.errorModel) {
|
||||
this.errorModel.clear({silent: true});
|
||||
delete (this.errorModel);
|
||||
}
|
||||
}
|
||||
this.cleanup();
|
||||
Backform.Form.prototype.remove.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user