fix: highlightItem calls to no argument

This commit is contained in:
newtextdoc1111
2025-05-08 22:20:06 +09:00
parent 27174964b3
commit 5d0d51f2c3
+3 -2
View File
@@ -73,7 +73,7 @@ class AutocompleteUI {
} else if (this.selectedIndex >= this.candidates.length) {
this.selectedIndex = 0; // Wrap around to top
}
this.#highlightItem(this.selectedIndex);
this.#highlightItem();
}
/** Selects the currently highlighted item */
@@ -101,7 +101,7 @@ class AutocompleteUI {
this.element.style.display = 'block'; // Make it visible
// Highlight the first item
this.#highlightItem(this.selectedIndex);
this.#highlightItem();
}
/**
@@ -295,6 +295,7 @@ class AutocompleteUI {
#highlightItem() {
const tbody = this.element.querySelector('tbody');
if (!tbody) return;
const items = tbody.children; // Get rows (tr) from tbody
for (let i = 0; i < items.length; i++) {
if (i === this.selectedIndex) {