<?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: addEventListener acts differently on dropdown items in Calcite Design System Questions</title>
    <link>https://community.esri.com/t5/calcite-design-system-questions/addeventlistener-acts-differently-on-dropdown/m-p/1169321#M117</link>
    <description>&lt;P&gt;I don't see any documented events for &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown-item/" target="_self"&gt;dropdown-item&lt;/A&gt;, but dropdown does have a few &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown/#component-api-events" target="_self"&gt;events&lt;/A&gt; you should try out.&amp;nbsp; I think &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown/#component-api-events-calciteDropdownSelect" target="_self"&gt;calciteDropdownSelect&lt;/A&gt; probably give you what you're looking for via the &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown/#component-api-properties-selectedItems" target="_self"&gt;selectedItems&lt;/A&gt; property.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Apr 2022 14:29:45 GMT</pubDate>
    <dc:creator>JohnGrayson</dc:creator>
    <dc:date>2022-04-29T14:29:45Z</dc:date>
    <item>
      <title>addEventListener acts differently on dropdown items</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/addeventlistener-acts-differently-on-dropdown/m-p/1169119#M116</link>
      <description>&lt;P&gt;I have two dropdowns. One is to call basemap and another to call a custom widget&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;calcite-dropdown label="Dropdown label"&amp;gt;
            &amp;lt;calcite-button slot="dropdown-trigger"&amp;gt;Tools&amp;lt;/calcite-button&amp;gt;
            &amp;lt;calcite-dropdown-group selection-mode="single"&amp;gt;
              &amp;lt;calcite-dropdown-item label="thebasemaps" id='thebasemaps'&amp;gt;Basemaps&amp;lt;/calcite-dropdown-item&amp;gt;
              &amp;lt;calcite-dropdown-item label="X" id='X'&amp;gt;X widget&amp;lt;/calcite-dropdown-item&amp;gt;
            &amp;lt;/calcite-dropdown-group&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;So I have the addeventlistener:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;document.querySelector("calcite-dropdown-item").addEventListener("click", handleWidgetsClick);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, when I click on the Basemaps, it displays the basemaps gallery with no issues. When I click on the X widget, no reaction. The handlewidgets is not triggered.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why the addlistener is not triggered for the X widget?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 01:08:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/addeventlistener-acts-differently-on-dropdown/m-p/1169119#M116</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2022-04-29T01:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: addEventListener acts differently on dropdown items</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/addeventlistener-acts-differently-on-dropdown/m-p/1169321#M117</link>
      <description>&lt;P&gt;I don't see any documented events for &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown-item/" target="_self"&gt;dropdown-item&lt;/A&gt;, but dropdown does have a few &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown/#component-api-events" target="_self"&gt;events&lt;/A&gt; you should try out.&amp;nbsp; I think &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown/#component-api-events-calciteDropdownSelect" target="_self"&gt;calciteDropdownSelect&lt;/A&gt; probably give you what you're looking for via the &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown/#component-api-properties-selectedItems" target="_self"&gt;selectedItems&lt;/A&gt; property.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 14:29:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/addeventlistener-acts-differently-on-dropdown/m-p/1169321#M117</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2022-04-29T14:29:45Z</dc:date>
    </item>
  </channel>
</rss>

