Compare commits

...

3 Commits

Author SHA1 Message Date
Mucahit Bilal GOKER c74660eb8e Merge branch 'main' into bilal/cnx-3102-deselecting-elements-doesnt-reset-other-visuals 2026-02-20 12:56:06 +03:00
bimgeek dba6add26d only set skip flag on active selection 2026-02-17 16:38:44 +03:00
bimgeek 6ece39d95d yolo 2026-02-14 17:00:53 +03:00
2 changed files with 11 additions and 1 deletions
@@ -246,7 +246,15 @@ async function handleObjectClicked(hit: any, isMultiSelect: boolean, mouseEvent?
const ids = selection.map((s) => s.id)
await viewerHandler.selectObjects(ids)
} else {
visualStore.setPostClickSkipNeeded(false)
// Only set skip flag if this visual has active selections to clear.
// When selectionManager.clear() is called with no active selection,
// Power BI won't send a reaction update, so there's nothing to skip.
// Setting the flag unconditionally would cause it to eat the NEXT
// legitimate Data update (e.g., adding Color By input).
const hasActiveSelection = selectionHandler.getCurrentSelection().length > 0
if (hasActiveSelection) {
visualStore.setPostClickSkipNeeded(true)
}
tooltipHandler.hide()
if (!isMultiSelect) {
selectionHandler.clear()
@@ -87,6 +87,7 @@ export class FilteredSelectionExtension extends SelectionExtension {
if (!selection) {
console.log('🎯 No selection, calling super with null')
super.onObjectClicked(selection)
this.emit(FilteredSelectionEvent.FilteredObjectClicked, null)
return
}
@@ -117,6 +118,7 @@ export class FilteredSelectionExtension extends SelectionExtension {
} else {
// If no valid hits, treat as empty selection
super.onObjectClicked(null)
this.emit(FilteredSelectionEvent.FilteredObjectClicked, null)
}
}