You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Added clear field functionality and searchEmpty check
In this update, we've added the ability to clear the search field in the Hero component and introduced a check using the `searchEmpty` variable. Key additions include:
- The creation of a handleClear function to reset the form and clear error messages when the "Clear" button is clicked.
- The addition of a "Clear" icon component for the clear button.
- The use of a form reference (formRef) for easier access to form elements.
- Conditional display of the "Clear" button only when the search field is not empty and `searchEmpty` is false.
This enhancement improves the user experience by allowing users to reset the search field more conveniently while also considering the `searchEmpty` variable. A new branch has also been created for these changes.
0 commit comments