mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-18 18:23:43 +08:00
feat: Enhance search history dropdown with absolute positioning and empty state styling; improve video player autoplay functionality
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user