993
edições
Sem resumo de edição |
Sem resumo de edição |
||
Linha 67: | Linha 67: | ||
arr = optionsValues<!--{$OptId|default:$id|escape:'html'}-->.filter(data => { | arr = optionsValues<!--{$OptId|default:$id|escape:'html'}-->.filter(data => { | ||
return data.phrases.filter(curr => curr.toLowerCase(). | return data.phrases.filter(curr => curr.toLowerCase().indexOf(searchWord)) > -1; | ||
}).map(option => { | }).map(option => { | ||
let isSelected = option.group === selectBtn<!--{$id|default:''|escape:'html'}-->.firstElementChild.innerText ? "selected" : ""; | let isSelected = option.group === selectBtn<!--{$id|default:''|escape:'html'}-->.firstElementChild.innerText ? "selected" : ""; | ||
Linha 73: | Linha 73: | ||
html += `<li class="groupTitle ${isSelected}"> ${option.group} </li>`; | html += `<li class="groupTitle ${isSelected}"> ${option.group} </li>`; | ||
option.phrases.filter(curr => curr.toLowerCase(). | option.phrases.filter(curr => curr.toLowerCase().indexOf(searchWord) > -1).map(phrase => { | ||
html += `<li onclick="updateName('${option.group}', '${option.img}', '${option.obs}')"> ${phrase} </li>`; | html += `<li onclick="updateName('${option.group}', '${option.img}', '${option.obs}')"> ${phrase} </li>`; | ||
}); | }); |