Revert "Fix filter changes not triggering refetch"
This reverts commit bb0a5187b7.
This commit is contained in:
parent
bb0a5187b7
commit
6b50ac6937
|
|
@ -507,9 +507,7 @@ export default function MapView({
|
|||
mapRef,
|
||||
viewParams,
|
||||
mainFilter,
|
||||
mainFilters,
|
||||
subFilter,
|
||||
subFilters,
|
||||
contentFilter,
|
||||
timeHours,
|
||||
searchQuery,
|
||||
|
|
|
|||
|
|
@ -373,9 +373,7 @@ export function usePostsEngine({
|
|||
mapRef,
|
||||
viewParams,
|
||||
mainFilter,
|
||||
mainFilters = [], // Full array for cache key comparison
|
||||
subFilter,
|
||||
subFilters = [], // Full array for cache key comparison
|
||||
contentFilter = "all",
|
||||
timeHours,
|
||||
searchQuery,
|
||||
|
|
@ -1020,10 +1018,7 @@ export function usePostsEngine({
|
|||
|
||||
const [lng, lat] = resolvedView.center;
|
||||
const radiusKm = resolvedView.radiusKm || 750;
|
||||
// Include full arrays in filterKey so any toggle triggers refetch
|
||||
const mainKey = mainFilters.length > 0 ? mainFilters.sort().join(",") : mainFilter;
|
||||
const subKey = subFilters.length > 0 ? subFilters.sort().join(",") : subFilter;
|
||||
const filterKey = `${mainKey}|${subKey}|${contentFilter}`;
|
||||
const filterKey = `${mainFilter}|${subFilter}`;
|
||||
const currentKey = `${filterKey}|${timeHours}`;
|
||||
const reqId = ++requestSeqRef.current;
|
||||
let bounds = null;
|
||||
|
|
@ -1223,8 +1218,7 @@ export function usePostsEngine({
|
|||
delayedFetchRef.current = null;
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [viewParams, mapReady, mainFilter, JSON.stringify(mainFilters), subFilter, JSON.stringify(subFilters), contentFilter, mapRef, timeHours, expandedElRef, refreshVisibleAndMarkers, computeVisible, onAutoWidenTimeFilter, syncMarkers, username]);
|
||||
}, [viewParams, mapReady, mainFilter, subFilter, contentFilter, mapRef, timeHours, expandedElRef, refreshVisibleAndMarkers, computeVisible, onAutoWidenTimeFilter, syncMarkers, username]);
|
||||
|
||||
useEffect(() => {
|
||||
const q = (searchQuery || "").trim();
|
||||
|
|
|
|||
Loading…
Reference in New Issue