only show search cancel when there is somethign to cancel

This commit is contained in:
Mo Tarbin 2024-07-06 13:27:41 -04:00
parent 4f9e2f9394
commit df83cc8948

View file

@ -298,12 +298,14 @@ const MyChores = () => {
}} }}
onChange={handleSearchChange} onChange={handleSearchChange}
endDecorator={ endDecorator={
searchTerm && (
<CancelRounded <CancelRounded
onClick={() => { onClick={() => {
setSearchTerm('') setSearchTerm('')
setFilteredChores(chores) setFilteredChores(chores)
}} }}
/> />
)
} }
/> />
</Box> </Box>