only show search cancel when there is somethign to cancel
This commit is contained in:
parent
4f9e2f9394
commit
df83cc8948
1 changed files with 8 additions and 6 deletions
|
@ -298,12 +298,14 @@ const MyChores = () => {
|
|||
}}
|
||||
onChange={handleSearchChange}
|
||||
endDecorator={
|
||||
<CancelRounded
|
||||
onClick={() => {
|
||||
setSearchTerm('')
|
||||
setFilteredChores(chores)
|
||||
}}
|
||||
/>
|
||||
searchTerm && (
|
||||
<CancelRounded
|
||||
onClick={() => {
|
||||
setSearchTerm('')
|
||||
setFilteredChores(chores)
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
|
|
Loading…
Add table
Reference in a new issue