Fix SelectionPanel - click applies immediately, opens Info
Some checks failed
Build Docker Image / build (push) Has been cancelled
Some checks failed
Build Docker Image / build (push) Has been cancelled
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
:loading="selectionLoading"
|
||||
:loading-more="selectionLoadingMore"
|
||||
:has-more="selectionHasMore && !filterByBounds"
|
||||
@select="onSelectItem"
|
||||
@close="onCloseDrawer"
|
||||
@load-more="onLoadMore"
|
||||
@hover="onHoverItem"
|
||||
/>
|
||||
@@ -114,7 +116,8 @@ const {
|
||||
cancelSelect,
|
||||
openInfo,
|
||||
closeInfo,
|
||||
setLabel
|
||||
setLabel,
|
||||
closeDrawer
|
||||
} = useCatalogSearch()
|
||||
|
||||
// Info panel composable
|
||||
@@ -375,15 +378,20 @@ const onMapSelect = async (item: any) => {
|
||||
setLabel(infoType, itemId, itemName)
|
||||
}
|
||||
|
||||
// Handle selection from SelectionPanel
|
||||
// Handle selection from SelectionPanel - open Info and close drawer
|
||||
const onSelectItem = (type: string, item: any) => {
|
||||
if (item.uuid && item.name) {
|
||||
// NEW: Open Info instead of selecting directly
|
||||
openInfo(type as 'hub' | 'supplier' | 'offer', item.uuid)
|
||||
setLabel(type, item.uuid, item.name)
|
||||
closeDrawer()
|
||||
}
|
||||
}
|
||||
|
||||
// Close drawer
|
||||
const onCloseDrawer = () => {
|
||||
closeDrawer()
|
||||
}
|
||||
|
||||
// Handle Info panel events
|
||||
const onInfoClose = () => {
|
||||
closeInfo()
|
||||
|
||||
Reference in New Issue
Block a user