From 8ee4cc90ab4758f80b872dc5d7095508ac020add Mon Sep 17 00:00:00 2001 From: MaxOvs Date: Thu, 27 Oct 2022 19:35:12 +0300 Subject: [PATCH 1/2] Fixed multipul checkBox --- src/cg-dropdown.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cg-dropdown.js b/src/cg-dropdown.js index 35e791b..4b33224 100644 --- a/src/cg-dropdown.js +++ b/src/cg-dropdown.js @@ -339,7 +339,7 @@ export class DropDown { * @description Рендер елементов в селекте. */ #render(select) { - const { styles, multiselect, searchMode } = this.#options; + const { styles, multiselect, searchMode, multiselectTag } = this.#options; const random = Math.random().toString(36).substring(2, 10); if (select || (select && styles)) { @@ -381,8 +381,12 @@ export class DropDown { const checkBox = document.createElement('input'); checkBox.type = 'checkbox'; checkBox.setAttribute('id', `chbox-${dataItem.id}`); - liItem.appendChild(checkBox); + + if (multiselectTag) { + checkBox.classList.add('displayHide'); + } + nativSelect.setAttribute('multiple', 'multiple'); } From 36a60bbd7e362e42b5c2b75572e3442f09624738 Mon Sep 17 00:00:00 2001 From: MaxOvs Date: Fri, 28 Oct 2022 12:37:35 +0300 Subject: [PATCH 2/2] Fix input text in search --- src/style/main.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/style/main.scss b/src/style/main.scss index e7cbf23..39f6dc0 100644 --- a/src/style/main.scss +++ b/src/style/main.scss @@ -115,6 +115,7 @@ body { &:focus { outline: none; + color: white; } } }