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}
|
onChange={handleSearchChange}
|
||||||
endDecorator={
|
endDecorator={
|
||||||
<CancelRounded
|
searchTerm && (
|
||||||
onClick={() => {
|
<CancelRounded
|
||||||
setSearchTerm('')
|
onClick={() => {
|
||||||
setFilteredChores(chores)
|
setSearchTerm('')
|
||||||
}}
|
setFilteredChores(chores)
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
Loading…
Add table
Reference in a new issue