mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Properly assign dropdownParent in Select2 controls. Fixes #4218
This commit is contained in:
@@ -2017,13 +2017,6 @@ define([
|
||||
if (!data.visible)
|
||||
this.$el.addClass(Backform.hiddenClassName);
|
||||
|
||||
// Dropdown body can be render at user given location
|
||||
// If isDropdownParent flag is set to true then, By default we will
|
||||
// display it on the control itself.
|
||||
if (data.select2.isDropdownParent) {
|
||||
select2Opts.dropdownParent = data.select2.dropdownParent || this.$el;
|
||||
}
|
||||
|
||||
this.$el.html(this.template(data)).addClass(field.name);
|
||||
|
||||
var select2Opts = _.extend({
|
||||
@@ -2032,6 +2025,13 @@ define([
|
||||
options: (this.field.get('options') || this.defaults.options),
|
||||
});
|
||||
|
||||
// Dropdown body can be render at user given location
|
||||
// If isDropdownParent flag is set to true then, By default we will
|
||||
// display it on the control itself.
|
||||
if (data.select2.isDropdownParent) {
|
||||
select2Opts.dropdownParent = data.select2.dropdownParent || this.$el;
|
||||
}
|
||||
|
||||
// If disabled then no need to show placeholder
|
||||
if (data.disabled || data.mode === 'properties') {
|
||||
select2Opts['placeholder'] = '';
|
||||
|
||||
Reference in New Issue
Block a user