Reset to placeholder on reset

This commit is contained in:
Manav Rathi
2024-09-12 14:22:26 +05:30
parent 32315b1149
commit 117c884b3e

View File

@@ -183,6 +183,8 @@ const SearchInput: React.FC<Omit<SearchBarProps, "setIsInSearchMode">> = ({
onChange={handleChange}
inputValue={inputValue}
onInputChange={handleInputChange}
// Needed to get the placeholder to reset on `resetSearch`.
controlShouldRenderValue={false}
isClearable
escapeClearsValue
onFocus={handleFocus}