993
edições
Sem resumo de edição |
Sem resumo de edição |
||
Linha 51: | Linha 51: | ||
addOptions(selectedValue); | addOptions(selectedValue); | ||
wrapper.classList.remove("active"); | wrapper.classList.remove("active"); | ||
document.querySelector('#img-select-search').src = | document.querySelector('#img-select-search').src = img; | ||
document.querySelector('#img-select-search').classList.remove('d-none'); | document.querySelector('#img-select-search').classList.remove('d-none'); | ||
document.querySelector('#img-select-search').classList.add('d-block'); | document.querySelector('#img-select-search').classList.add('d-block'); | ||
Linha 63: | Linha 63: | ||
arr = optionsImage.filter(data => { | arr = optionsImage.filter(data => { | ||
return | return curr.toLowerCase().indexOf(searchWord) > -1; | ||
}).map(option => { | }).map(option => { | ||
let isSelected = option.group === selectBtn.firstElementChild.innerText ? "selected" : ""; | let isSelected = option.group === selectBtn.firstElementChild.innerText ? "selected" : ""; | ||
let html = ""; | let html = ""; | ||
html += `<li onclick="updateName('${option.label}', '${option.img}', '${option.obs}')" class="${isSelected}"> ${option. | html += `<li onclick="updateName('${option.label}', '${option.img}', '${option.obs}')" class="${isSelected}"> ${option.label} </li>`; | ||
return html; | return html; |