<?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: Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/456721#M14064</link>
    <description>&lt;P&gt;I updated my code so that the call to ISelectionManager.applySelectionFilter() is called in only two cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) When the user interacts with the slicer&lt;/P&gt;&lt;P&gt;2) On first load, and only if the current selection isn't the first or last (as dictated by the settings).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Origionally the code would call ISelectionManager.applySelectionFilter() when ever the contents of the slicer was updated programatically.&amp;nbsp; In most cases the selection was the same.&amp;nbsp; But, from what I can tell there isn't a chance for a feedback loop any more.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jul 2018 15:24:27 GMT</pubDate>
    <dc:creator>mattbattey</dc:creator>
    <dc:date>2018-07-06T15:24:27Z</dc:date>
    <item>
      <title>Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/450593#M13856</link>
      <description>&lt;P&gt;Calling ISelectionManager.applySelectionFilter() from IVisual.update() sometimes causes an infinite update loop. I developed a custom slicer visual that will automatically choose the first or last item from the category. To do this, I call ISelectionManager.applySelectionFilter() form the first call IVisual.update() after the visual's constructor.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It doesn't happen every time, but is more likely when I publish a report to PBIOnline where the selected value is not the last or first value. Since all of the other visuals in the report are also set to the previous value, it causes the report to load, then reload to the newly seleted value. It seems to happen even when the visuals aren't configured to filter back on my custom slicer.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Anyone else run into this type of problem before? Any recommendations?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 16:33:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/450593#M13856</guid>
      <dc:creator>mattbattey</dc:creator>
      <dc:date>2018-06-28T16:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/452554#M13904</link>
      <description>&lt;P&gt;Recommendation is to stop calling applyFilter from update as each filter event will force PBI to call update method.&lt;/P&gt;
&lt;P&gt;This is why infinity loop might appear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 10:07:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/452554#M13904</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-07-02T10:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/453914#M13948</link>
      <description>&lt;P&gt;I think limiting the where and how applySelectionFilter() is called is key.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Durring the call to IVisual.update(), other visuals could have placed some or all of the selected items out of context.&amp;nbsp; What is recommended for this case?&amp;nbsp; I can see two options: (1) clear and make a new selection, or&amp;nbsp; (2) take no action at all,&amp;nbsp;leaving the selection in place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Option 2 seems like it could leave the visual out of sync with the rest of the report.&amp;nbsp; Since this visual is a slicer, it seems like it should have positive control at all times, and shouldn't have a "empty" state like a chart or grid.&amp;nbsp; Recommendations are welcome...&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 16:21:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/453914#M13948</guid>
      <dc:creator>mattbattey</dc:creator>
      <dc:date>2018-07-03T16:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/454351#M13959</link>
      <description>&lt;P&gt;Slicer should not be affected by incoming selection but slicers will be filtered by other slicer as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our recommendation is to call applyJsonFilter only for users actions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 07:08:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/454351#M13959</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-07-04T07:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/456721#M14064</link>
      <description>&lt;P&gt;I updated my code so that the call to ISelectionManager.applySelectionFilter() is called in only two cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) When the user interacts with the slicer&lt;/P&gt;&lt;P&gt;2) On first load, and only if the current selection isn't the first or last (as dictated by the settings).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Origionally the code would call ISelectionManager.applySelectionFilter() when ever the contents of the slicer was updated programatically.&amp;nbsp; In most cases the selection was the same.&amp;nbsp; But, from what I can tell there isn't a chance for a feedback loop any more.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jul 2018 15:24:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/456721#M14064</guid>
      <dc:creator>mattbattey</dc:creator>
      <dc:date>2018-07-06T15:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calling ISelectionManager.applySelectionFilter() from IVisual.update() causes infinite loop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/457511#M14092</link>
      <description>&lt;P&gt;Such solution looks good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 07:07:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-ISelectionManager-applySelectionFilter-from-IVisual/m-p/457511#M14092</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-07-09T07:07:48Z</dc:date>
    </item>
  </channel>
</rss>

