From 9bbd51fd61c054dae87bef330c32083e756c9f7a Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 17 Nov 2022 19:39:12 +0200 Subject: [PATCH] select fix --- client/src/ui/select.js | 13 ++++++++++++- frontend/less/espo/misc/selectize/custom.less | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/ui/select.js b/client/src/ui/select.js index dd282cb014..1f4c697500 100644 --- a/client/src/ui/select.js +++ b/client/src/ui/select.js @@ -49,8 +49,9 @@ define('ui/select', ['lib!Selectize'], (Selectize) => { let plugins = []; Select.loadEspoSelectPlugin(); - plugins.push('espo_select'); + plugins.push('auto_position'); + plugins.push('espo_select'); let itemClasses = {}; @@ -226,6 +227,16 @@ define('ui/select', ['lib!Selectize'], (Selectize) => { Selectize.define('espo_select', function () { let self = this; + this.positionDropdown = (function () { + let original = self.positionDropdown; + + return function () { + original.apply(this, arguments); + + this.$dropdown.css({margin: 'unset'}); + }; + })(); + this.refreshOptions = (function () { let original = self.refreshOptions; diff --git a/frontend/less/espo/misc/selectize/custom.less b/frontend/less/espo/misc/selectize/custom.less index 3761b18000..8fff92ab43 100644 --- a/frontend/less/espo/misc/selectize/custom.less +++ b/frontend/less/espo/misc/selectize/custom.less @@ -53,6 +53,10 @@ } } } + + .selectize-dropdown { + margin-top: 0; + } } .selectize-control.multi .selectize-input > div {