mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Clear the node cache, when an node is created/updated to make sure - we
will always have latest data related to that type of node. Also, fixed
the cache_level for different node types.
This commit also contains fixes for the following issue:
* In extension module - use the 'node-list-by-name' instead of using a
custom 'node-ajax-options' control, and removed redundant template
schemas from it.
* When we tries to destroy the select2 object from
Select2Cell/Select2Control while releasing the properties view,
sometimes select2 can not find the instance related it for some
unknown reason. Hence - before removing it we will check for manual
instance existance using $.data('select2').
* When we traverse through the browser tree nodes very quickly, it tries
to remove the object before it gets created completely, and results
into an exception.
* Icon in the select2 drop down list was not visible due to some CSS
issues.
Apart of that, we will generate two new browser events -
'pgadmin-node:created:<NODE-TYPE>', 'pgadmin-node:updated:<NODE-TYPE>'
whenever a new node is created, or an existing node will be updated.
This commit is contained in:
@@ -1993,13 +1993,15 @@
|
||||
// Refresh SQL Field to refresh the control lazily after it renders
|
||||
setTimeout(function() {
|
||||
self.refreshTextArea.apply(self);
|
||||
}, 100);
|
||||
}, 0);
|
||||
|
||||
return self;
|
||||
},
|
||||
|
||||
refreshTextArea: function() {
|
||||
this.sqlCtrl.refresh();
|
||||
if (this.sqlCtrl) {
|
||||
this.sqlCtrl.refresh();
|
||||
}
|
||||
},
|
||||
|
||||
remove: function() {
|
||||
|
||||
@@ -450,7 +450,11 @@
|
||||
this.undelegateEvents();
|
||||
|
||||
if (this.$select) {
|
||||
this.$select.select2('destroy');
|
||||
if ( this.$select.data('select2')) {
|
||||
this.$select.select2('destroy');
|
||||
}
|
||||
delete this.$select;
|
||||
this.$select = null;
|
||||
}
|
||||
|
||||
this.$el.empty();
|
||||
@@ -530,7 +534,9 @@
|
||||
|
||||
remove: function() {
|
||||
this.$select.off('change', this.onSave);
|
||||
this.$select.select2('destroy');
|
||||
if (this.$select.data('select2')) {
|
||||
this.$select.select2('destroy');
|
||||
}
|
||||
this.$el.empty();
|
||||
Backgrid.SelectCell.prototype.remove.apply(this, arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user