Skip to content

Commit

Permalink
psp-9649 ensure that new map markers display immediately, and that ma…
Browse files Browse the repository at this point in the history
…p refresh also triggers the advanced filter refresh. (#4476)
  • Loading branch information
devinleighsmith authored Nov 14, 2024
1 parent 86d4198 commit 5eca897
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,9 @@ const advancedFilterSideBarStates = {
actions: [
send({ type: 'REFRESH_PROPERTIES' }),
assign({
isFiltering: () => false,
showDisposed: () => false,
showRetired: () => false,
activePimsPropertyIds: () => [],
advancedSearchCriteria: () => new PropertyFilterFormModel(),
}),
],
},
Expand Down
3 changes: 2 additions & 1 deletion source/frontend/src/features/properties/map/MapContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const MapContainer: React.FC<React.PropsWithChildren<MapContainerProps>> = () =>
setVisiblePimsProperties,
advancedSearchCriteria,
isMapVisible,
isLoading,
} = useMapStateMachine();

const { getMatchingProperties } = usePimsPropertyRepository();
Expand All @@ -58,7 +59,7 @@ const MapContainer: React.FC<React.PropsWithChildren<MapContainerProps>> = () =>

useEffect(() => {
filterProperties(advancedSearchCriteria?.toApi());
}, [filterProperties, advancedSearchCriteria]);
}, [filterProperties, advancedSearchCriteria, isLoading]);

const cursorClass = isSelecting
? MapCursors.DRAFT
Expand Down

0 comments on commit 5eca897

Please sign in to comment.