<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: persist properties without reloading? in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/persist-properties-without-reloading/m-p/1760942#M3639</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/166547"&gt;@jprdynamicapps&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you want to use &lt;FONT face="courier new,courier"&gt;persistProperties&lt;/FONT&gt;, you can't avoid an &lt;FONT face="courier new,courier"&gt;update&lt;/FONT&gt; being called, as the properties need to be re-enumerated. &lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/c1687d1ae8c5ffc2df91821bf194a91ed76760d8/index.d.ts#L1510" target="_self"&gt;However, you can check &lt;FONT face="courier new,courier"&gt;options.type&lt;/FONT&gt;&lt;/A&gt; in your &lt;FONT face="courier new,courier"&gt;update&lt;/FONT&gt; method to determine the kind of operation being carried out and route your logic accordingly.&lt;/P&gt;
&lt;P&gt;If it's &lt;FONT face="courier new,courier"&gt;VisualUpdateType.All&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;VisualUpdateType.Data&lt;/FONT&gt;, then this indicates the dataView should be re-checked. Otherwise, you should be able to leave it unprocessed. &lt;A href="https://github.com/dm-p/powerbi-visuals-smlc/blob/master/src/visual.ts#L93" target="_self"&gt;Here's an example of how you might handle this&lt;/A&gt; using one of my visuals, if you want to take a look.&lt;/P&gt;
&lt;P&gt;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 &lt;FONT face="courier new,courier"&gt;persistProperties&lt;/FONT&gt; might not. If it does, then your idea of a checksum may be how to proceed for subsequent updates, if/when they fire.&lt;/P&gt;
&lt;P&gt;Hopefully this provides you with some ideas. Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 06:13:19 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2021-04-02T06:13:19Z</dc:date>
    <item>
      <title>persist properties without reloading?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/persist-properties-without-reloading/m-p/1760436#M3638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'd like to persist the scroll position of my visual.&amp;nbsp; However, when I call persistProperties, I get called back with an update and therefore reload my data, which isn't practical.&amp;nbsp; Any way to keep this from happening or some other way to persist the information?&lt;/P&gt;&lt;P&gt;1. Tried doing it on destroy(), but that doesn't seem to get called.&lt;/P&gt;&lt;P&gt;2. Can't use localstorage because I can't get the visual certified.&lt;/P&gt;&lt;P&gt;3. Maybe some way to recognize that the data hasn't changed?&amp;nbsp; I may resort to a checksum if no better way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;-jpr&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 18:12:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/persist-properties-without-reloading/m-p/1760436#M3638</guid>
      <dc:creator>jprdynamicapps</dc:creator>
      <dc:date>2021-04-01T18:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: persist properties without reloading?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/persist-properties-without-reloading/m-p/1760942#M3639</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/166547"&gt;@jprdynamicapps&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you want to use &lt;FONT face="courier new,courier"&gt;persistProperties&lt;/FONT&gt;, you can't avoid an &lt;FONT face="courier new,courier"&gt;update&lt;/FONT&gt; being called, as the properties need to be re-enumerated. &lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/c1687d1ae8c5ffc2df91821bf194a91ed76760d8/index.d.ts#L1510" target="_self"&gt;However, you can check &lt;FONT face="courier new,courier"&gt;options.type&lt;/FONT&gt;&lt;/A&gt; in your &lt;FONT face="courier new,courier"&gt;update&lt;/FONT&gt; method to determine the kind of operation being carried out and route your logic accordingly.&lt;/P&gt;
&lt;P&gt;If it's &lt;FONT face="courier new,courier"&gt;VisualUpdateType.All&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;VisualUpdateType.Data&lt;/FONT&gt;, then this indicates the dataView should be re-checked. Otherwise, you should be able to leave it unprocessed. &lt;A href="https://github.com/dm-p/powerbi-visuals-smlc/blob/master/src/visual.ts#L93" target="_self"&gt;Here's an example of how you might handle this&lt;/A&gt; using one of my visuals, if you want to take a look.&lt;/P&gt;
&lt;P&gt;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 &lt;FONT face="courier new,courier"&gt;persistProperties&lt;/FONT&gt; might not. If it does, then your idea of a checksum may be how to proceed for subsequent updates, if/when they fire.&lt;/P&gt;
&lt;P&gt;Hopefully this provides you with some ideas. Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 06:13:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/persist-properties-without-reloading/m-p/1760942#M3639</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-04-02T06:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: persist properties without reloading?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/persist-properties-without-reloading/m-p/1761979#M3640</link>
      <description>&lt;P&gt;Thanks, Daniel.&amp;nbsp; The update type comes back as data, so no joy on that one.&lt;/P&gt;&lt;P&gt;Doing a hash on the matrix part of the dataview is doing the trick for now.&lt;/P&gt;&lt;P&gt;Appreciate your thoughts and your source code.&lt;/P&gt;&lt;P&gt;-jpr&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 18:52:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/persist-properties-without-reloading/m-p/1761979#M3640</guid>
      <dc:creator>jprdynamicapps</dc:creator>
      <dc:date>2021-04-02T18:52:23Z</dc:date>
    </item>
  </channel>
</rss>

