Deleting the object (model & nested model/collection) during showing

the node properties.
This commit is contained in:
Ashesh Vashi
2016-04-15 16:14:01 +05:30
parent 1c0e477823
commit 58fcbd943a
4 changed files with 81 additions and 5 deletions

View File

@@ -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);
}
});