Debuging and repare code

This commit is contained in:
2023-01-17 20:21:43 +03:00
parent bf9dc01ad5
commit 8897e12464
10 changed files with 306 additions and 100 deletions

View File

@ -1,4 +1,4 @@
import { nativeOptionMultiple } from '../utils/utilsTs';
import { customStylesFormat, nativeOptionMultiple } from '../utils/utilsTs';
import { ICreateBreadCrumb } from './create-element.interface';
/**
@ -63,8 +63,8 @@ export function createBreadCrumb(
liChip.appendChild(svgIcon);
if (styles) {
// const { chips } = styles;
// customStylesFormat(chips, liChip);
const { chips } = styles;
customStylesFormat(chips!, liChip);
}
svgIcon.addEventListener('click', (event) => {

View File

@ -48,6 +48,7 @@ export function getSelectText(
} else {
select!.innerText = 'Select...';
}
return select!;
}
@ -116,7 +117,7 @@ export function clearSelect(select: HTMLElement, element: Element, dataSelectTex
svgIcon.appendChild(path1);
svgIcon.appendChild(path2);
if (multiselectTag) {
if (multiselectTag && multiselectTag == true) {
return;
}
@ -162,7 +163,7 @@ export function clearSelect(select: HTMLElement, element: Element, dataSelectTex
* @param {NodeList} element NodeList нативного селекта
* @param {any} item выбранный элемент в кастомном селекте
*/
export function nativeOptionOrdinary(element: NodeListOf<Element> | undefined, item: any) {
export function nativeOptionOrdinary(element: NodeListOf<Element> | undefined, item: string) {
element!.forEach((option) => {
option.removeAttribute('selected');
if (option.textContent === item) {