<?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 How to programmatically get value of selected calcite dropdown in Calcite Design System Questions</title>
    <link>https://community.esri.com/t5/calcite-design-system-questions/how-to-programmatically-get-value-of-selected/m-p/1359074#M554</link>
    <description>&lt;P&gt;Just wondering what the best practice for programmatically getting the value of a selected item from a dropdown.&amp;nbsp; I know I need to listen to the 'onCalciteDropdownSelect' event, then go into 'target' and finally 'selectedItems'.&amp;nbsp; But from there, what should I use to get the value?&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2023 14:03:55 GMT</pubDate>
    <dc:creator>Danik-B</dc:creator>
    <dc:date>2023-12-11T14:03:55Z</dc:date>
    <item>
      <title>How to programmatically get value of selected calcite dropdown</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/how-to-programmatically-get-value-of-selected/m-p/1359074#M554</link>
      <description>&lt;P&gt;Just wondering what the best practice for programmatically getting the value of a selected item from a dropdown.&amp;nbsp; I know I need to listen to the 'onCalciteDropdownSelect' event, then go into 'target' and finally 'selectedItems'.&amp;nbsp; But from there, what should I use to get the value?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 14:03:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/how-to-programmatically-get-value-of-selected/m-p/1359074#M554</guid>
      <dc:creator>Danik-B</dc:creator>
      <dc:date>2023-12-11T14:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get value of selected calcite dropdown</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/how-to-programmatically-get-value-of-selected/m-p/1359132#M555</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/512652"&gt;@Danik-B&lt;/a&gt;&amp;nbsp;Thanks for reaching out! Since you mentioned&amp;nbsp; "onCalciteDropdownSelect", assume you might be using React? If so, you could leverage the &lt;A href="https://react.dev/reference/react/useState" target="_blank" rel="noopener"&gt;useState&lt;/A&gt; hook with the &lt;A href="https://developers.arcgis.com/calcite-design-system/components/dropdown-item/" target="_self"&gt;Dropdown Item&lt;/A&gt;'s "label" property/attribute.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/geospatialem/pen/NWompQO" target="_blank" rel="noopener"&gt;Here's an example without a framework&lt;/A&gt; to showcase some of what the process could work towards.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 15:49:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/how-to-programmatically-get-value-of-selected/m-p/1359132#M555</guid>
      <dc:creator>KittyHurley</dc:creator>
      <dc:date>2023-12-11T15:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get value of selected calcite dropdown</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/how-to-programmatically-get-value-of-selected/m-p/1359159#M556</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/574219"&gt;@KittyHurley&lt;/a&gt;&amp;nbsp;Thanks for that.&amp;nbsp; I was using innerText but I like the idea of using label.&amp;nbsp; Thanks for the solution.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 16:26:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/how-to-programmatically-get-value-of-selected/m-p/1359159#M556</guid>
      <dc:creator>Danik-B</dc:creator>
      <dc:date>2023-12-11T16:26:25Z</dc:date>
    </item>
  </channel>
</rss>

