Fix SelectionPanel - click applies immediately, opens Info
Some checks failed
Build Docker Image / build (push) Has been cancelled

This commit is contained in:
Ruslan Bakiev
2026-01-26 14:49:55 +07:00
parent a48dcf24ee
commit 911de423f6
2 changed files with 21 additions and 38 deletions

View File

@@ -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()