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();
|
||||
if (query === '') return
|
||||
categorizeText(query).then(() => {
|
||||
try {
|
||||
await getAllSuggestions();
|
||||
if (query === '') return
|
||||
await categorizeText(query)
|
||||
getRef('main_search_field').value = ''
|
||||
renderElem(getRef('suggestions'), html``)
|
||||
})
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
|
||||
async function getAllSuggestions() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user