diff --git a/source/frontend/src/components/common/mapFSM/machineDefinition/mapMachine.ts b/source/frontend/src/components/common/mapFSM/machineDefinition/mapMachine.ts index 57033e12f7..4cd049e150 100644 --- a/source/frontend/src/components/common/mapFSM/machineDefinition/mapMachine.ts +++ b/source/frontend/src/components/common/mapFSM/machineDefinition/mapMachine.ts @@ -397,10 +397,9 @@ const advancedFilterSideBarStates = { actions: [ send({ type: 'REFRESH_PROPERTIES' }), assign({ - isFiltering: () => false, showDisposed: () => false, showRetired: () => false, - activePimsPropertyIds: () => [], + advancedSearchCriteria: () => new PropertyFilterFormModel(), }), ], }, diff --git a/source/frontend/src/features/properties/map/MapContainer.tsx b/source/frontend/src/features/properties/map/MapContainer.tsx index 9c5aec82e5..601fdbc96f 100644 --- a/source/frontend/src/features/properties/map/MapContainer.tsx +++ b/source/frontend/src/features/properties/map/MapContainer.tsx @@ -37,6 +37,7 @@ const MapContainer: React.FC> = () => setVisiblePimsProperties, advancedSearchCriteria, isMapVisible, + isLoading, } = useMapStateMachine(); const { getMatchingProperties } = usePimsPropertyRepository(); @@ -58,7 +59,7 @@ const MapContainer: React.FC> = () => useEffect(() => { filterProperties(advancedSearchCriteria?.toApi()); - }, [filterProperties, advancedSearchCriteria]); + }, [filterProperties, advancedSearchCriteria, isLoading]); const cursorClass = isSelecting ? MapCursors.DRAFT