fix: clear button, page scroll, and metadata loading state

This commit is contained in:
tdgao
2026-08-14 12:47:37 -06:00
parent e2d5d4dd37
commit ee74727e36
3 changed files with 25 additions and 12 deletions
+7 -1
View File
@@ -39,7 +39,7 @@
@focusin="handleSearchFocus"
@focusout="handleSearchFocusout"
@click="handleSearchClick"
@clear="handleSearchInput"
@clear="handleSearchClear"
>
<template v-if="showChevron" #right>
<ChevronLeftIcon
@@ -842,6 +842,12 @@ function handleSearchInput() {
}
}
function handleSearchClear() {
userHasTyped.value = true
emit('searchInput', searchQuery.value)
closeDropdown()
}
function handleSearchFocus(event: FocusEvent) {
const target = event.target
if (props.selectSearchTextOnFocus && target instanceof HTMLInputElement) {