fixes icon picker

This commit is contained in:
Christian Beutel
2024-09-14 19:27:59 +02:00
parent 414fa9b752
commit 01ffaf9b8f
6 changed files with 35 additions and 12 deletions

View File

@@ -28,10 +28,11 @@
await tick();
const dropdownMenu = document.querySelector(".menu");
if (dropdownMenu) {
let dropdownHTML = dropdownMenu.innerHTML;
for (const li of dropdownMenu.children) {
for (let i = 0; i < dropdownMenu.children.length; i++) {
const li = dropdownMenu.children[i];
const textNode = li.getElementsByTagName("p")[0];
textNode.innerHTML = items[i].text;
const text = textNode.innerText.replace(
new RegExp(value, "gi"),
(match) => `<strong>${match}</strong>`,