Changes in Image-Gallery Page then DateRange cross button will work correctly.
This commit is contained in:
parent
d4be35b44d
commit
eaccf0fca2
@ -99,15 +99,23 @@ const ImageGalleryPage = () => {
|
||||
const handleRemoveFilter = (filterKey, valueId) => {
|
||||
setAppliedFilters((prev) => {
|
||||
const updated = { ...prev };
|
||||
|
||||
if (Array.isArray(updated[filterKey])) {
|
||||
updated[filterKey] = updated[filterKey].filter((id) => id !== valueId);
|
||||
} else if (filterKey === "startDate" || filterKey === "endDate") {
|
||||
}
|
||||
else if (filterKey === "startDate" || filterKey === "endDate") {
|
||||
updated[filterKey] = null;
|
||||
}
|
||||
else if (filterKey === "dateRange") {
|
||||
updated.startDate = null;
|
||||
updated.endDate = null;
|
||||
}
|
||||
|
||||
return updated;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// --- Chips ---
|
||||
const appliedFiltersChips = useMemo(() => {
|
||||
const chips = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user