Forum Discussion
Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop
- 8 years ago
Slicer should not be affected by incoming selection but slicers will be filtered by other slicer as well.
Our recommendation is to call applyJsonFilter only for users actions.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Slicer should not be affected by incoming selection but slicers will be filtered by other slicer as well.
Our recommendation is to call applyJsonFilter only for users actions.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
I updated my code so that the call to ISelectionManager.applySelectionFilter() is called in only two cases.
1) When the user interacts with the slicer
2) On first load, and only if the current selection isn't the first or last (as dictated by the settings).
Origionally the code would call ISelectionManager.applySelectionFilter() when ever the contents of the slicer was updated programatically. In most cases the selection was the same. But, from what I can tell there isn't a chance for a feedback loop any more.
- v-viig8 years agoCommunity Champion
Such solution looks good.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals