Skip to content

Commit b5df339

Browse files
authored
Remove resource card selection upon detail panel close (#2099)
1 parent b3f4fcd commit b5df339

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

geonode_mapstore_client/client/js/plugins/ResourceDetails/ResourceDetails.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import ResourcesPanelWrapper from '@mapstore/framework/plugins/ResourcesCatalog/
2727
import TargetSelectorPortal from '@mapstore/framework/plugins/ResourcesCatalog/components/TargetSelectorPortal';
2828
import useResourcePanelWrapper from '@mapstore/framework/plugins/ResourcesCatalog/hooks/useResourcePanelWrapper';
2929
import { getShowDetails } from '@mapstore/framework/plugins/ResourcesCatalog/selectors/resources';
30-
import { setShowDetails } from '@mapstore/framework/plugins/ResourcesCatalog/actions/resources';
30+
import { setShowDetails, setSelectedResource } from '@mapstore/framework/plugins/ResourcesCatalog/actions/resources';
3131
import PendingStatePrompt from '@mapstore/framework/plugins/ResourcesCatalog/containers/PendingStatePrompt';
3232
import DetailsPanel from './containers/DetailsPanel';
3333
import useDetectClickOut from '@js/hooks/useDetectClickOut';
@@ -252,6 +252,7 @@ function ResourceDetailsPanel({
252252
height,
253253
show,
254254
onShow,
255+
onClose,
255256
enableFilters,
256257
resource,
257258
resourcesGridId,
@@ -280,6 +281,7 @@ function ResourceDetailsPanel({
280281

281282
function handleConfirm() {
282283
onShow(false);
284+
onClose(null);
283285
}
284286

285287
function handleClose() {
@@ -374,7 +376,8 @@ const ResourceDetailsPlugin = connect(
374376
pendingChanges: getResourceDirtyState
375377
}),
376378
{
377-
onShow: setShowDetails
379+
onShow: setShowDetails,
380+
onClose: setSelectedResource
378381
}
379382
)(ResourceDetails);
380383

0 commit comments

Comments
 (0)