Skip to content

Commit

Permalink
Fix bug preventing map filter from opening
Browse files Browse the repository at this point in the history
  • Loading branch information
luisvasq committed Nov 19, 2024
1 parent a3a0565 commit 88ec565
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/ui/views/map/useMapFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const useMapFilter = ({
const pageLayout = useSelector(selectPageLayout)
const dispatch = useDispatch()

const { menuOpen, handleOpenMenu, handleCloseMenu } = useMenu()
const { anchorEl, handleOpenMenu, handleCloseMenu } = useMenu()

const filterableProps = useMemo(
() =>
Expand Down Expand Up @@ -104,11 +104,11 @@ const useMapFilter = ({
labelStart,
isFilterDisabled,
numActiveFilters,
menuOpen,
filterableProps,
filterableExtraProps,
handleOpenMenu,
handleCloseMenu,
filterOpen: Boolean(anchorEl),
handleOpenFilter: handleOpenMenu,
handleCloseFilter: handleCloseMenu,
handleSaveFilters,
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/utils/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const useMenu = () => {
setAnchorEl(event.currentTarget)
}

const handleCloseMenu = () => {
const handleCloseMenu = (event) => {
if (event != null) event.stopPropagation()
setAnchorEl(null)
}

Expand Down

0 comments on commit 88ec565

Please sign in to comment.