Fix search not expanding

This commit is contained in:
Daniel Schädler 2025-03-15 13:48:10 +01:00
parent c23ae0cf8c
commit 30ad58c1d8
1 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,12 @@ export function FavoriteBar({teams}) {
} }
}, [isVisible]); }, [isVisible]);
useEffect(() => {
if (favoriteBarRef.current) {
favoriteBarRef.current.style.maxHeight = `${favoriteBarRef.current.scrollHeight}px`;
}
}, [searchQuery]);
const toggleFavorite = team => { const toggleFavorite = team => {
if (favorite && favorite.id === team.id) { if (favorite && favorite.id === team.id) {
setFavorite(null); setFavorite(null);