mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Reset the column list properly if the access method is changed on an index to ensure error handling works correctly. Fixes #2009
This commit is contained in:
parent
6e14bef801
commit
2787c5c207
@ -285,8 +285,11 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
|
||||
var msg = '{{ _('Changing access method will clear columns collection') }}';
|
||||
alertify.confirm(msg, function (e) {
|
||||
// User clicks Ok, lets clear collection
|
||||
var column_collection = self.model.get('columns');
|
||||
column_collection.reset();
|
||||
var column_collection = self.model.get('columns'),
|
||||
col_length = column_collection.length;
|
||||
for (var i=(col_length-1);i>=0;i--) {
|
||||
column_collection.remove(column_collection.models[i]);
|
||||
}
|
||||
}, function() {
|
||||
// User clicks Cancel set previous value again in combo box
|
||||
setTimeout(function(){
|
||||
|
Loading…
Reference in New Issue
Block a user