Forum Discussion
Power BI Embedding - determine if report content has changed when in edit mode
Hi pbi_embedder1,
I think you need to add listeners.
1) Go to Microsoft example application - https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#
2) Scroll down to Sample Report
3) Press button Select
4) Activate radio button Edit Mode
5) Press button Run
6) Go to tab Interact
7) You will see available methods and properties for embedding. Go to Edit & Save and expand it
8) Go to SaveAs triggered event. And on the right side you will see a code related to this option.
You can search through this menu to see other options.
Regards,
Ruslan
- pbi_embedder18 years agoFrequent Visitor
Hi zoloturu,
Thanks for the reply. I've already added a listener to the SaveAs event and it works fine when a user selects the Save As button. My issue/question is more related to the UX. If the user makes edits to an embedded report and forgets to click Save or Save As before leaving the site or clicking on another report, I would like a modal dialog pop up to remind them to save the report. Ideally I would like a "OnDirty" event or "Dirty" property of the report object so that I can tell a report has changed and to perform the appropriate action. I'm not sure if it's possibe right now but wanted to see if anyone knew of a way.