UX improvement
This commit is contained in:
parent
9874a5385f
commit
ef2d191fc0
12
index.html
12
index.html
@ -1944,13 +1944,17 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function processNavbarSearch() {
|
async function processNavbarSearch() {
|
||||||
const query = getRef('main_search_field').value.trim();
|
const query = getRef('main_search_field').value.trim();
|
||||||
if (query === '') return
|
try {
|
||||||
categorizeText(query).then(() => {
|
await getAllSuggestions();
|
||||||
|
if (query === '') return
|
||||||
|
await categorizeText(query)
|
||||||
getRef('main_search_field').value = ''
|
getRef('main_search_field').value = ''
|
||||||
renderElem(getRef('suggestions'), html``)
|
renderElem(getRef('suggestions'), html``)
|
||||||
})
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getAllSuggestions() {
|
async function getAllSuggestions() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user