Added label and fix submit form and etc.

This commit is contained in:
2022-10-28 15:45:09 +03:00
parent ac49225a44
commit 2edd1393ef
6 changed files with 134 additions and 39 deletions

View File

@ -77,7 +77,6 @@ export function createBreadcrumb(data, title, index, id) {
export function createNativeSelect() {
const nativSelect = document.createElement('select');
nativSelect.setAttribute('form', 'data');
nativSelect.setAttribute('name', 'dataSelect');
nativSelect.classList.add('nativSelect');
return nativSelect;

View File

@ -41,15 +41,16 @@ export function customStyles(element, styles) {
return;
}
const { head, caret, placeholder } = styles;
const { head, caret, placeholder, lable } = styles;
const cgSelect = element.querySelector('.cg-select');
const caretSelect = element.querySelector('.caret');
const placeholderSelect = element.querySelector('.selected');
const lableItem = element.parentElement.querySelector('h1.label');
customStylesFormat(head, cgSelect);
customStylesFormat(caret, caretSelect);
customStylesFormat(lable, lableItem);
if (placeholderSelect) {
customStylesFormat(placeholder, placeholderSelect);