Fix an issue where the dropdown becomes misaligned/displaced. Fixes #4138

This commit is contained in:
Murtuza Zabuawala 2019-04-09 12:09:25 +05:30 committed by Akshay Joshi
parent 490999f528
commit 6016a5ee98
3 changed files with 27 additions and 0 deletions

View File

@ -11,6 +11,7 @@ notes for it.
.. toctree::
:maxdepth: 1
release_notes_4_6
release_notes_4_5
release_notes_4_4
release_notes_4_3

View File

@ -0,0 +1,17 @@
***********
Version 4.6
***********
Release date: 2019-05-02
This release contains a number of new features and fixes reported since the
release of pgAdmin4 4.5
Features
********
Bug fixes
*********
| `Bug #4138 <https://redmine.postgresql.org/issues/4138>`_ - Fix an issue where the dropdown becomes misaligned/displaced.

View File

@ -1910,6 +1910,7 @@ define([
multiple: false,
emptyOptions: false,
preserveSelectionOrder: false,
isDropdownParent: false,
},
}),
@ -1987,6 +1988,7 @@ define([
multiple: false,
emptyOptions: false,
preserveSelectionOrder: false,
isDropdownParent: false,
});
// Evaluate the disabled, visible, and required option
@ -2015,6 +2017,13 @@ 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({