diff --git a/src/Map/Popup/Popup.jsx b/src/Map/Popup/Popup.jsx
index a0591f6..46d3a3f 100644
--- a/src/Map/Popup/Popup.jsx
+++ b/src/Map/Popup/Popup.jsx
@@ -11,9 +11,10 @@ import { usePopup } from "../../stores/usePopup.js";
import { PanoramaIcon } from "../../icons/PanoramaIcon";
import {useOtherGroups, usePostamatesAndPvzGroups} from "../../api.js";
import {useMemo} from "react";
-import {getFilteredGroups} from "../../utils.js";
+import {doesMatchFilter, getFilteredGroups} from "../../utils.js";
import Checkbox from "antd/es/checkbox/Checkbox";
import {usePointSelection} from "../../stores/usePointSelection.js";
+import {usePendingPointsFilters} from "../../stores/usePendingPointsFilters.js";
const getRivalsName = (feature) => {
const { data: postamatesAndPvzGroups } = usePostamatesAndPvzGroups();
@@ -88,12 +89,14 @@ const SingleFeaturePopup = ({ feature }) => {
const MultipleFeaturesPopup = ({ features }) => {
const { setPopup } = usePopup();
const { selection, include, exclude } = usePointSelection();
+ const { filters, ranges } = usePendingPointsFilters();
return (
{features.map((feature) => {
const featureId = feature.properties.id;
- const isSelected = !selection.excluded.has(featureId) || selection.included.has(featureId);
+ const isSelected = (doesMatchFilter(filters, ranges, feature) && !selection.excluded.has(featureId)) ||
+ selection.included.has(featureId);
const handleSelect = () => {
if (isSelected) {
exclude(featureId);
@@ -111,7 +114,7 @@ const MultipleFeaturesPopup = ({ features }) => {
)}