Clear Select Exercise field onFocus
This commit is contained in:
@@ -186,7 +186,10 @@ const ActiveSessionView: React.FC<ActiveSessionViewProps> = ({ tracker, activeSe
|
|||||||
setSearchQuery(e.target.value);
|
setSearchQuery(e.target.value);
|
||||||
setShowSuggestions(true);
|
setShowSuggestions(true);
|
||||||
}}
|
}}
|
||||||
onFocus={() => setShowSuggestions(true)}
|
onFocus={() => {
|
||||||
|
setSearchQuery('');
|
||||||
|
setShowSuggestions(true);
|
||||||
|
}}
|
||||||
onBlur={() => setTimeout(() => setShowSuggestions(false), 100)} // Delay hiding to allow click
|
onBlur={() => setTimeout(() => setShowSuggestions(false), 100)} // Delay hiding to allow click
|
||||||
icon={<Dumbbell size={10} />}
|
icon={<Dumbbell size={10} />}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
|
|||||||
@@ -80,7 +80,10 @@ const SporadicView: React.FC<SporadicViewProps> = ({ tracker, lang }) => {
|
|||||||
setSearchQuery(e.target.value);
|
setSearchQuery(e.target.value);
|
||||||
setShowSuggestions(true);
|
setShowSuggestions(true);
|
||||||
}}
|
}}
|
||||||
onFocus={() => setShowSuggestions(true)}
|
onFocus={() => {
|
||||||
|
setSearchQuery('');
|
||||||
|
setShowSuggestions(true);
|
||||||
|
}}
|
||||||
onBlur={() => setTimeout(() => setShowSuggestions(false), 100)}
|
onBlur={() => setTimeout(() => setShowSuggestions(false), 100)}
|
||||||
icon={<Dumbbell size={10} />}
|
icon={<Dumbbell size={10} />}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user