UX improvement

This commit is contained in:
sairaj mote 2023-08-23 01:41:52 +05:30
parent 9874a5385f
commit ef2d191fc0

View File

@ -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() {