<?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 hide a widget programmatically.. in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829913#M8179</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H3 style="font-size: 17px; font-weight: normal;"&gt;Hi all,&lt;BR /&gt;Is it possible to hide a widget programmatically?&lt;BR /&gt;I want to do this without close a widget.&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 style="font-size: 17px; font-weight: normal;"&gt;Thanks,&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 style="font-size: 17px; font-weight: normal;"&gt;Naty&lt;/H3&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Dec 2015 08:09:51 GMT</pubDate>
    <dc:creator>NatashaManzuiga</dc:creator>
    <dc:date>2015-12-16T08:09:51Z</dc:date>
    <item>
      <title>hide a widget programmatically..</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829913#M8179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H3 style="font-size: 17px; font-weight: normal;"&gt;Hi all,&lt;BR /&gt;Is it possible to hide a widget programmatically?&lt;BR /&gt;I want to do this without close a widget.&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 style="font-size: 17px; font-weight: normal;"&gt;Thanks,&lt;/H3&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 style="font-size: 17px; font-weight: normal;"&gt;Naty&lt;/H3&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 08:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829913#M8179</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2015-12-16T08:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: hide a widget programmatically..</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829914#M8180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Naty,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; It depends on if it is an onscreen widget or a widget in the widgetpool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code that works for onscreen widget:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Require&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;'jimu/PanelManager',
PanelManager,

&lt;SPAN class="keyword"&gt;var pm = PanelManager.getInstance();&amp;nbsp; &lt;/SPAN&gt;
pm.closePanel(&lt;SPAN class="keyword"&gt;this.appConfig.widgetOnScreen.widgets[&lt;SPAN class="number"&gt;4&lt;/SPAN&gt;]);//&lt;SPAN class="keyword"&gt;close the 5th widget in the config.json inside the &lt;SPAN class="keyword"&gt;widgetOnScreen object&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;//or&lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;pm.closePanel(pm.activePanel);//close the active panel&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:01:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829914#M8180</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: hide a widget programmatically..</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829915#M8181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/rscheitlin"&gt;rscheitlin&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to close a widget when my custom widget is opened. I have used your solution above, but because the widget that I am trying to close resided in the widget pool, I have changed&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;pm.closePanel(this.appConfig.widgetOnScreen.widgets[4])&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;pm.closePanel(this.appConfig.widgetPool.widgets[1]);&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I keep getting an error that reads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TypeError: panel.setState is not a function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The widget is an "In-Panel" widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you have any idea as to why I am getting this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2016 18:55:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829915#M8181</guid>
      <dc:creator>ChristopherSchreiber</dc:creator>
      <dc:date>2016-09-19T18:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: hide a widget programmatically..</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829916#M8182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What theme are you using? A screen shot would really help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2016 23:16:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/hide-a-widget-programmatically/m-p/829916#M8182</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-09-19T23:16:59Z</dc:date>
    </item>
  </channel>
</rss>

