Search in the working!

This commit is contained in:
2022-10-25 16:07:12 +03:00
parent 372d5d4175
commit 19a857280d
6 changed files with 87 additions and 95 deletions

View File

@ -93,3 +93,13 @@ export function createNativSelectOption() {
nativOption.classList.add('nativSelect__nativOption');
return nativOption;
}
export function createInputSearch() {
const intputSearch = document.createElement('input');
intputSearch.type = 'text';
intputSearch.setAttribute('id', 'searchSelect');
intputSearch.setAttribute('placeholder', 'Search...');
return intputSearch;
}

View File

@ -31,23 +31,6 @@ export function createSelected(element, content, styles) {
}
}
export function createSelectedSearch(element) {
if (element) {
element.innerHTML = `
<div class="cg-select">
<div class="searchSelect">
<p class="selected"></p>
<textarea autofocus type="text" id="searchSelect" ></textarea>
</div>
<div class="caret"></div>
</div>
`;
} else {
return;
}
}
/**
* Поиск и стилизация елементов полученных из styles экземпляра DropDown
* @param {HTMLElement} element созданный экземпляр класса DropDown