Skip to content

Commit

Permalink
fix-434 BUG: Abbreviation is not cleared when input is empty after cl…
Browse files Browse the repository at this point in the history
…icking clear button (#435)

- Removing the abbreviation card, error when user click the clear button.

Co-authored-by: miteshsavani810 <[email protected]>
  • Loading branch information
miteshsavani and miteshsavani810 authored Mar 3, 2025
1 parent 559e44b commit 18a0f7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ const Form = () => {

const handleClearInput = useCallback(() => {
setUserInput("");
clearDataBeforeFetch();
userInputRef.current?.focus();
}, []);
}, [clearDataBeforeFetch]);

const hadleKeyDownOnClear = useCallback(
(e) => {
Expand Down

0 comments on commit 18a0f7d

Please sign in to comment.