Forum Discussion
Visual.update() not triggered when switching from Reading to Edit View
It works well on my side with Dot Plot custom visual. Can you share code of update method?
InFocusEdit is an focus mode that can be activated by opening ... menu in the right top corner of a csutom visual.
Then you should select Edit. Please note a csutom visual must specify advancedEditModeSupport: true in the capabilities to support Focus Edit Mode.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Just create a new Custom Visual:
> pbiviz new example
then change the update() function to display the viewMode and editMode flags:
public update(options: VisualUpdateOptions) {
if (typeof this.textNode !== "undefined") {
this.textNode.textContent = "ViewMode: " + options.viewMode.toString() + ", EditMode: " + options.editMode;
}
}And insert this into capabilities:
"advancedEditModeSupport": 2,
Results:
Directly after loadSwitching to EditAfter resizing visual in Edit ModeSwitching to Advanced Edit ModeGoing back to Reading view
As you can see, Switching to edit mode does not change the ViewMode (or EditMode), it needs the second update (data or resize update). And viewMode never gets value 2.
- v-viig8 years agoCommunity Champion
Have you filled all of required data fields?
I guess this is a root case of the issue.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- blumi788 years agoHelper I
Of course I have, as you can see at the top. If I would have not, update() won't be triggered at all.
- v-viig8 years agoCommunity Champion
Could you please share source code and data-set for further investigation as it works well on our side?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- Alex_Koch1 year agoFrequent Visitor
I am facing the same problem. When will it be solved?