<?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: Get tab name onclick in Calcite Design System Questions</title>
    <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1265186#M347</link>
    <description>&lt;P&gt;There are current issues with the selectedTitle as acknowledged by ESRI.&lt;/P&gt;&lt;P&gt;Please use this instead.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/lkoumis1/pen/GRXEwyN?editors=1111" target="_blank"&gt;https://codepen.io/lkoumis1/pen/GRXEwyN?editors=1111&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 21:25:51 GMT</pubDate>
    <dc:creator>LefterisKoumis</dc:creator>
    <dc:date>2023-03-07T21:25:51Z</dc:date>
    <item>
      <title>Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160143#M72</link>
      <description>&lt;P&gt;Using the tabs and wondering of how to capture the title of the tab when it's clicked on.&lt;/P&gt;&lt;P&gt;Tried:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;document&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;querySelector&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"calcite-tab-title"&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;addEventListener&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"click"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;handleActionBarClick1&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Apr 2022 00:39:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160143#M72</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2022-04-01T00:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160144#M73</link>
      <description>&lt;P&gt;Calcite Components have custom events which you can find on their doc page. For example, here is the event for `calcite-tab-title`:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/calcite-design-system/components/tab-title/#component-api-events" target="_blank"&gt;https://developers.arcgis.com/calcite-design-system/components/tab-title/#component-api-events&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calcite-tab-nav also has an event:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/calcite-design-system/components/tab-nav/#component-api-events-calciteTabChange" target="_blank"&gt;https://developers.arcgis.com/calcite-design-system/components/tab-nav/#component-api-events-calciteTabChange&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 00:48:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160144#M73</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2022-04-01T00:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160319#M75</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;I setup id:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;calcite-tab-nav slot="tab-nav" id="thetabs"&amp;gt;
 
//then wanted to capture the event:
const controlTabs = document.getElementById("thetabs")
  controlTabs.addEventListener("calciteTabChange", async (event) =&amp;gt; { console.log(event.target.value) });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When you click the first tab it works. but when you click the other tabs it return undefined.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 16:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160319#M75</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2022-04-01T16:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160358#M76</link>
      <description>&lt;P&gt;The event's callback function doesn't need to be async in your code snippet. Also, the tab info is event.detail.tab. Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;document.addEventListener("calciteTabChange", (event) =&amp;gt; console.log(event.detail.tab));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 18:00:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160358#M76</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2022-04-01T18:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160364#M77</link>
      <description>&lt;P&gt;Here is a codepen:&amp;nbsp;&lt;A href="https://codepen.io/benesri/pen/wvprVQd?editors=1010" target="_blank"&gt;https://codepen.io/benesri/pen/wvprVQd?editors=1010&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 17:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1160364#M77</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2022-04-01T17:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1264332#M344</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/71373"&gt;@BenElan&lt;/a&gt;&amp;nbsp;could you please share the code with calcite v1.0.7? It seems like the&amp;nbsp;event.detail.tab did not work with new version.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2023 15:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1264332#M344</guid>
      <dc:creator>Wittawat</dc:creator>
      <dc:date>2023-03-05T15:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1264347#M345</link>
      <description>&lt;P&gt;Since version 1.0.3 the event.detail.tab is depreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;See:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/calcite-components/blob/master/CHANGELOG.md" target="_blank"&gt;https://github.com/Esri/calcite-components/blob/master/CHANGELOG.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LefterisKoumis_0-1678044095795.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64371iAA52CB4B72A80801/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LefterisKoumis_0-1678044095795.png" alt="LefterisKoumis_0-1678044095795.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;use instead:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;event&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;target&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;selectedTitle&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 05 Mar 2023 19:22:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1264347#M345</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2023-03-05T19:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1264397#M346</link>
      <description>&lt;P&gt;Thank you for your reply. I've tried the&amp;nbsp;&lt;SPAN&gt;event&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;target&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;selectedTitle but I have received an incorrect tab name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please kindly see the example here&lt;/SPAN&gt;:&amp;nbsp;&lt;A href="https://codepen.io/aonwittawat/pen/vYzZozd" target="_blank"&gt;https://codepen.io/aonwittawat/pen/vYzZozd&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 05:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1264397#M346</guid>
      <dc:creator>Wittawat</dc:creator>
      <dc:date>2023-03-06T05:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get tab name onclick</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1265186#M347</link>
      <description>&lt;P&gt;There are current issues with the selectedTitle as acknowledged by ESRI.&lt;/P&gt;&lt;P&gt;Please use this instead.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/lkoumis1/pen/GRXEwyN?editors=1111" target="_blank"&gt;https://codepen.io/lkoumis1/pen/GRXEwyN?editors=1111&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 21:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/get-tab-name-onclick/m-p/1265186#M347</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2023-03-07T21:25:51Z</dc:date>
    </item>
  </channel>
</rss>

