diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js index ae762f6..3647dfb 100644 --- a/web/pgadmin/static/js/backform.pgadmin.js +++ b/web/pgadmin/static/js/backform.pgadmin.js @@ -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'] = '';