<?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: Modal with calcite-web in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/1170970#M77226</link>
    <description>&lt;P&gt;You're right.&amp;nbsp; The active property sets the modal visibility (fade in or fade out).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// show modal
document.querySelector('calcite-modal#&amp;lt;modal ID&amp;gt;').active = true;
// hide modal
document.querySelector('calcite-modal#&amp;lt;modal ID&amp;gt;').active = false;&lt;/LI-CODE&gt;&lt;P&gt;The modal ID is optional, or you can just use the ID as the selector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 06:59:08 GMT</pubDate>
    <dc:creator>FC_Basson</dc:creator>
    <dc:date>2022-05-05T06:59:08Z</dc:date>
    <item>
      <title>Modal with calcite-web</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/534392#M49802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can&amp;nbsp;I launch a calcite modal directly in javascript ?&amp;nbsp;I want to launch&amp;nbsp;programmatically these modals (&lt;A class="link-titled" href="http://esri.github.io/calcite-web/documentation/patterns/#modals" title="http://esri.github.io/calcite-web/documentation/patterns/#modals"&gt;Calcite Web | Esri Design Patterns&lt;/A&gt;&amp;nbsp;) as example.&lt;/P&gt;&lt;P&gt;Where can&amp;nbsp;I found documentation about that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jérôme.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 14:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/534392#M49802</guid>
      <dc:creator>JérômeDuckers</dc:creator>
      <dc:date>2019-03-25T14:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modal with calcite-web</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/534393#M49803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The &lt;A href="http://esri.github.io/calcite-web/documentation/javascript/" rel="nofollow noopener noreferrer" target="_blank"&gt;JavaScript &lt;/A&gt;section of the docs touches on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scroll down and you can see the options for the Modal events in the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to import the &lt;A href="http://esri.github.io/calcite-web/documentation/javascript/#event-bus" rel="nofollow noopener noreferrer" target="_blank"&gt;event bus&lt;/A&gt; and then you can emit the modal event with a modal id to open and close the modals programmatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; bus &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; 'calcite&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;web`&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Opens a modal specified by data-modal attribute&lt;/SPAN&gt;
bus&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;emit&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'modal:open'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; modalId&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Closes open modal&lt;/SPAN&gt;
bus&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;emit&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'modal:close'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/534393#M49803</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-11T23:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Modal with calcite-web</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/534394#M49804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer Rene.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 20:55:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/534394#M49804</guid>
      <dc:creator>JérômeDuckers</dc:creator>
      <dc:date>2019-03-25T20:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Modal with calcite-web</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/1169032#M77172</link>
      <description>&lt;P&gt;For anyone coming across this, it looks like the approach has changed. calcite-modal has an "active" property, and I believe this is used to&amp;nbsp;show the modal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;"calcite-web" is deprecated, at least that's what noted here&amp;nbsp;&lt;A href="https://github.com/Esri/calcite-web" target="_blank" rel="noopener"&gt;https://github.com/Esri/calcite-web&lt;/A&gt;. That removes the bus referred to in the solution to the original question.&lt;/P&gt;&lt;P&gt;I haven't yet confirmed that the "active" property is the way to go, still working&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 20:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/1169032#M77172</guid>
      <dc:creator>coryeicher</dc:creator>
      <dc:date>2022-04-28T20:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modal with calcite-web</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/1170970#M77226</link>
      <description>&lt;P&gt;You're right.&amp;nbsp; The active property sets the modal visibility (fade in or fade out).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// show modal
document.querySelector('calcite-modal#&amp;lt;modal ID&amp;gt;').active = true;
// hide modal
document.querySelector('calcite-modal#&amp;lt;modal ID&amp;gt;').active = false;&lt;/LI-CODE&gt;&lt;P&gt;The modal ID is optional, or you can just use the ID as the selector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 06:59:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modal-with-calcite-web/m-p/1170970#M77226</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2022-05-05T06:59:08Z</dc:date>
    </item>
  </channel>
</rss>

