From 110f9252cd822ab836d4752af62c166c1932c3e9 Mon Sep 17 00:00:00 2001 From: Jeffrey Dowdle Date: Thu, 12 Dec 2024 09:53:24 +1100 Subject: [PATCH] fix(@dpc-sdp/ripple-tide-search): fixed map sidepanel needing a unique id in data --- .../components/global/TideCustomCollection.vue | 5 ++++- .../global/TideSearchListingResultsMapSidepanel.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/ripple-tide-search/components/global/TideCustomCollection.vue b/packages/ripple-tide-search/components/global/TideCustomCollection.vue index e1ae7bd985..49a0aeb39c 100644 --- a/packages/ripple-tide-search/components/global/TideCustomCollection.vue +++ b/packages/ripple-tide-search/components/global/TideCustomCollection.vue @@ -152,7 +152,10 @@ const searchResultsMappingFn = (item): TideSearchListingResultItem => { id: item._id, component: itemComponent, props: { - result: transformedItem + result: { + _id: item._id, + ...transformedItem + } } } } diff --git a/packages/ripple-tide-search/components/global/TideSearchListingResultsMapSidepanel.vue b/packages/ripple-tide-search/components/global/TideSearchListingResultsMapSidepanel.vue index cc24b9ae80..d8aa0233b0 100644 --- a/packages/ripple-tide-search/components/global/TideSearchListingResultsMapSidepanel.vue +++ b/packages/ripple-tide-search/components/global/TideSearchListingResultsMapSidepanel.vue @@ -151,7 +151,7 @@ const handlePageChange = (event) => { const getItemId = (item) => { if (!item) return '' - return get(item, props.mapConfig?.sidePanel?.itemIdObjPath || 'unique_id') + return get(item, props.mapConfig?.sidePanel?.itemIdObjPath || '_id') }