Ensure the switch animation is consistent on the table dialogue and avoid displaying an error incorrectly. Fixes #2624
parent
c15d814268
commit
0810c681c3
|
@ -593,15 +593,12 @@ define('pgadmin.node.table', [
|
|||
m.destroy();
|
||||
})
|
||||
if (primary_key_column_coll.length == 0) {
|
||||
setTimeout(function () {
|
||||
// There will be only on primary key so remove the first one.
|
||||
primary_key_coll.remove(primary_key_coll.first());
|
||||
/* Ideally above line of code should be "primary_key_coll.reset()".
|
||||
* But our custom DataCollection (extended from Backbone collection in datamodel.js)
|
||||
* does not respond to reset event, it only supports add, remove, change events.
|
||||
* And hence no custom event listeners/validators get called for reset event.
|
||||
*/
|
||||
}, 10);
|
||||
primary_key_coll.remove(primary_key_coll.first());
|
||||
}
|
||||
}
|
||||
primary_key_column_coll.trigger('pgadmin:multicolumn:updated', primary_key_column_coll);
|
||||
|
|
|
@ -487,6 +487,7 @@
|
|||
column = this.column,
|
||||
val = this.formatter.toRaw(this.$input.prop('checked'), model);
|
||||
|
||||
this.enterEditMode();
|
||||
// on bootstrap change we also need to change model's value
|
||||
model.set(column.get("name"), val);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue