- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Visual.update() not triggered when switching from Reading to Edit View
When switching from Edit to Reading View, Visual.update(options) is triggered and options.viewMode is set to 0.
Vice versa, when switching back to Edit View, Visual.update() ist NOT triggered and therefore I can not react to this event.
In the upcoming calls to Visual.update (like on data change or resizing), options.viewMode is 1 as expected.
Related, the typedef of ViewMode is
const enum ViewMode { View = 0, Edit = 1, InFocusEdit = 2, }
- but value 2 never occured in my occasions. What is "InFocusedEdit"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We can reproduce the same bug with the following steps:
- go to Edit mode
- download the report
- refresh the page
- go to Edit mode again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 load
Switching to Edit
After resizing visual in Edit Mode
Switching to Advanced Edit Mode
Going 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am facing the same problem. When will it be solved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course I have, as you can see at the top. If I would have not, update() won't be triggered at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @v-viig
after setting this issue away for some time, wondering why no one is able to reproduce it, I think, I found why:
It happens *only*, when the view mode is switched to "Actual Size". Which I'm doing almost always.
In other viewing modes, each switch of the Edit/Reading-Mode triggers a resize event and with this, the update() options contains the new mode flag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it a blocking issue for you or your customers?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@v-viig I'm calling it a soft-blocker. We have to put this workaround in our documentation as "a Power BI issue, which may be solved later". Can you reproduce it now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We'll put this issue into Power BI backlog for further investigation.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have also come across this problem. Is there as update on this, is it still in your backlog?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
already posted this in the "Service" board, but maybe it belongs here also:
When switching from Edit to Reading View, Visual.update(options) is triggered and options.viewMode is set to 0.
Vice versa, when switching back to Edit View, Visual.update() ist NOT triggered and therefore I can not react to this event.
In the upcoming calls to Visual.update (like on data change or resizing), options.viewMode is 1 as expected.
Related, the typedef of ViewMode is
const enum ViewMode { View = 0, Edit = 1, InFocusEdit = 2, }
- but value 2 never occured in my occasions. What is "InFocusedEdit"?

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
05-05-2022 09:22 PM | |||
06-21-2024 12:13 PM | |||
10-22-2024 04:31 AM | |||
11-20-2023 10:47 AM | |||
01-23-2025 07:48 AM |
User | Count |
---|---|
11 | |
3 | |
3 | |
2 | |
2 |
User | Count |
---|---|
15 | |
6 | |
5 | |
3 | |
3 |