mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 02:00:19 -06:00
We were refering to the wrong 'name' variable during cleaning up the
backform controls.
This commit is contained in:
parent
7b2c1bb9f8
commit
ffd41009ea
@ -112,9 +112,15 @@ define([
|
||||
// Remove the events for the dependent fields in the model
|
||||
var self = this,
|
||||
deps = self.field.get('deps');
|
||||
var attrArr = this.field.get('name').split('.');
|
||||
var name = attrArr.shift();
|
||||
|
||||
self.stopListening(self.model, 'change:' + name, self.render);
|
||||
self.stopListening(self.model.errorModel, 'change:' + name, self.updateInvalid);
|
||||
if (self.model.errorModel instanceof Backbone.Model) {
|
||||
self.stopListening(
|
||||
self.model.errorModel, 'change:' + name, self.updateInvalid
|
||||
);
|
||||
}
|
||||
|
||||
if (deps && _.isArray(deps)) {
|
||||
_.each(deps, function(d) {
|
||||
|
Loading…
Reference in New Issue
Block a user