This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
I'd like to persist the scroll position of my visual. However, when I call persistProperties, I get called back with an update and therefore reload my data, which isn't practical. Any way to keep this from happening or some other way to persist the information?
1. Tried doing it on destroy(), but that doesn't seem to get called.
2. Can't use localstorage because I can't get the visual certified.
3. Maybe some way to recognize that the data hasn't changed? I may resort to a checksum if no better way.
Thanks.
-jpr
Thanks, Daniel. The update type comes back as data, so no joy on that one.
Doing a hash on the matrix part of the dataview is doing the trick for now.
Appreciate your thoughts and your source code.
-jpr
Hi @jprdynamicapps,
If you want to use persistProperties, you can't avoid an update being called, as the properties need to be re-enumerated. However, you can check options.type in your update method to determine the kind of operation being carried out and route your logic accordingly.
If it's VisualUpdateType.All or VisualUpdateType.Data, then this indicates the dataView should be re-checked. Otherwise, you should be able to leave it unprocessed. Here's an example of how you might handle this using one of my visuals, if you want to take a look.
It's been a while since I've looked at this in detail, but IIRC manually changing a property in the pane will definitely flag a change in a visual's dataView, but persistProperties might not. If it does, then your idea of a checksum may be how to proceed for subsequent updates, if/when they fire.
Hopefully this provides you with some ideas. Good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.