mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Remove the header controls of subnode control properly, when removing it
from the VariableControl, and the customized TokenControl in the fts_configuration javascript module during clean up process.
This commit is contained in:
parent
9ed2530b1f
commit
7f1e57c2a6
@ -147,7 +147,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
// Select2 control for adding new tokens
|
||||
select2: {
|
||||
allowClear: true, width: 'style',
|
||||
placeholder: 'Select token'
|
||||
placeholder: '{{ _('Select token') }}'
|
||||
},
|
||||
first_empty: true,
|
||||
disabled: function(m) {
|
||||
@ -386,6 +386,10 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
this.listenTo(this.headerData, "select2", this.headerDataChanged);
|
||||
this.listenTo(this.collection, "remove", this.onAddorRemoveTokens);
|
||||
|
||||
// Remove header controls.
|
||||
_.each(this.controls, function(control) {
|
||||
control.remove();
|
||||
});
|
||||
TokenControl.__super__.remove.apply(this, arguments);
|
||||
|
||||
// Remove the header model
|
||||
|
@ -570,6 +570,11 @@
|
||||
this.listenTo(this.headerData, "select2", this.headerDataChanged);
|
||||
this.listenTo(this.collection, "remove", this.onRemoveVariable);
|
||||
|
||||
// Remove header controls.
|
||||
_.each(this.controls, function(control) {
|
||||
control.remove();
|
||||
});
|
||||
|
||||
VariableCollectionControl.__super__.remove.apply(this, arguments);
|
||||
|
||||
// Remove the header model
|
||||
|
Loading…
Reference in New Issue
Block a user