feat: Enhance search history dropdown with absolute positioning and empty state styling; improve video player autoplay functionality

This commit is contained in:
kuekhaoyang
2025-11-19 12:22:20 +08:00
parent fad6041df0
commit 3a756dd06f
10 changed files with 187 additions and 159 deletions
+4 -5
View File
@@ -44,11 +44,10 @@ export function useSearchHistory(
if (dropdownTimeoutRef.current) {
clearTimeout(dropdownTimeoutRef.current);
}
if (recentSearches.length > 0) {
setIsDropdownOpen(true);
setHighlightedIndex(-1);
}
}, [recentSearches.length]);
// Show dropdown even if there's no history (for consistent UX)
setIsDropdownOpen(true);
setHighlightedIndex(-1);
}, []);
const hideDropdown = useCallback(() => {
// Delay hiding to allow click events to fire