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'); } 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; } } }