Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I have successfully built a custom visual using the React JS, following this tutorial (https://docs.microsoft.com/pt-br/power-bi/developer/visuals/create-react-visual) and everything is working fine except the Event StopPropagation,
I developted a Table in React using the Material UI, everything ok, but in the event click (onClick props), im calling that function
selectionManager
.select(selected.identity, false)
.then((ids: powerbi.visuals.ISelectionId[]) => {
console.log("IdsSelecao", ids);
this.syncSelectionState(selected);
});
event.preventDefault();
event.stopPropagation();
In the syncSelectionState there are setState, which one call the render, its ok, but there are another unexpected render, calling the update method in the visual.ts consequently , thats render my components again...
Using the d3, this behavior is treated using this
this.selectionManager
.select(event.identity, true)
.then((ids: ISelectionId[]) => {
this.syncSelectionState(this.barSelection, ids, event.identity);
});
(<Event>d3.event).stopPropagation();
I need help to fix that, why doesnt stopPropagation work? Ive tryiing use
Anybody? I have no ideia to solve that
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |