Clear Select Exercise field onFocus

This commit is contained in:
AG
2025-11-29 19:35:39 +02:00
parent 4f363730d5
commit 3d6fd001cb
3 changed files with 8 additions and 2 deletions

View File

@@ -186,7 +186,10 @@ const ActiveSessionView: React.FC<ActiveSessionViewProps> = ({ tracker, activeSe
setSearchQuery(e.target.value);
setShowSuggestions(true);
}}
onFocus={() => setShowSuggestions(true)}
onFocus={() => {
setSearchQuery('');
setShowSuggestions(true);
}}
onBlur={() => setTimeout(() => setShowSuggestions(false), 100)} // Delay hiding to allow click
icon={<Dumbbell size={10} />}
autoComplete="off"

View File

@@ -80,7 +80,10 @@ const SporadicView: React.FC<SporadicViewProps> = ({ tracker, lang }) => {
setSearchQuery(e.target.value);
setShowSuggestions(true);
}}
onFocus={() => setShowSuggestions(true)}
onFocus={() => {
setSearchQuery('');
setShowSuggestions(true);
}}
onBlur={() => setTimeout(() => setShowSuggestions(false), 100)}
icon={<Dumbbell size={10} />}
autoComplete="off"

Binary file not shown.