fix(client): extract onSearchBlur to prevent Prettier multiline issue

- Prettier was re-expanding the inline semi-colon separated handler back to multi-line on each commit, breaking the Vue compiler
- extract into a named function to avoid the issue
This commit is contained in:
neon
2026-03-10 04:16:33 -06:00
parent dcc60006f5
commit 17e8ba0f49
+6 -4
View File
@@ -56,6 +56,11 @@ const showDropdown = computed(
(globalResults.value.length > 0 || globalSearchLoading.value || globalSearchSettled.value),
)
function onSearchBlur() {
searchFocused.value = false
selectedIndex.value = -1
}
watch(globalSearchQuery, () => {
selectedIndex.value = -1
})
@@ -243,10 +248,7 @@ function formatBadgeClass(fmt: string): string {
ref="desktopSearchInput"
v-model="globalSearchQuery"
@focus="searchFocused = true"
@blur="
searchFocused = false
selectedIndex = -1
"
@blur="onSearchBlur"
@keydown="handleSearchKeydown"
placeholder="Search all books..."
class="w-full h-8 pl-9 pr-8 text-[13px] rounded-full border-none bg-primary/5 text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1.5 focus:ring-primary/30 transition-all duration-300 shadow-inner shadow-black/5"