Commit ·
7e5f112
1
Parent(s): 6c32ef6
fix: Document search was using wrong selector '.doc-item' instead of '.doc-list-item'
Browse files- src/js/format.js +2 -2
src/js/format.js
CHANGED
|
@@ -327,9 +327,9 @@ function initDocSearch() {
|
|
| 327 |
|
| 328 |
searchInput.addEventListener('input', () => {
|
| 329 |
const query = searchInput.value.trim().toLowerCase();
|
| 330 |
-
const items = document.querySelectorAll('.doc-item');
|
| 331 |
items.forEach(item => {
|
| 332 |
-
const title = (item.textContent || '').toLowerCase();
|
| 333 |
item.style.display = title.includes(query) || !query ? '' : 'none';
|
| 334 |
});
|
| 335 |
});
|
|
|
|
| 327 |
|
| 328 |
searchInput.addEventListener('input', () => {
|
| 329 |
const query = searchInput.value.trim().toLowerCase();
|
| 330 |
+
const items = document.querySelectorAll('.doc-list-item');
|
| 331 |
items.forEach(item => {
|
| 332 |
+
const title = (item.querySelector('.doc-list-item__title')?.textContent || '').toLowerCase();
|
| 333 |
item.style.display = title.includes(query) || !query ? '' : 'none';
|
| 334 |
});
|
| 335 |
});
|