only show search cancel when there is somethign to cancel
This commit is contained in:
@@ -298,12 +298,14 @@ const MyChores = () => {
|
||||
}}
|
||||
onChange={handleSearchChange}
|
||||
endDecorator={
|
||||
<CancelRounded
|
||||
onClick={() => {
|
||||
setSearchTerm('')
|
||||
setFilteredChores(chores)
|
||||
}}
|
||||
/>
|
||||
searchTerm && (
|
||||
<CancelRounded
|
||||
onClick={() => {
|
||||
setSearchTerm('')
|
||||
setFilteredChores(chores)
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user