if filter selected then remove the advance filter and vera versa

This commit is contained in:
Mo Tarbin
2026-01-31 12:49:26 -05:00
parent 24a219853e
commit 445d8168e1

View File

@@ -762,6 +762,11 @@ const MyChores = () => {
selectedFilter={selectedChoreFilter}
setFilter={filter => {
setSelectedChoreFilterWithCache(filter)
// Clear active custom filter when quick filter is applied
if (activeFilterId) {
clearActiveFilter()
updateFilterUrl(null, null)
}
}}
onItemSelect={selected => {
setSelectedChoreSectionWithCache(selected.value)
@@ -1023,6 +1028,11 @@ const MyChores = () => {
setSearchTerm('')
setFilteredChores([])
// Reset quick filter to 'anyone' when custom filter is applied
if (selectedChoreFilter !== 'anyone') {
setSelectedChoreFilterWithCache('anyone')
}
// Clear project selection if the filter has project conditions
const filter = savedFilters.find(f => f.id === filterId)
if (filter?.conditions?.some(c => c.type === 'project')) {