<?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: Calcite Tabs in Expand Widget Throws Uncaught error in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1309242#M81723</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I talked to a coworker who is much more &amp;nbsp;experienced in this area.&lt;/P&gt;&lt;P&gt;You are getting the error because the tabs are first being rendered in the page and then being moved into the expand widget.&amp;nbsp;It would probably be better to not first create them in the page and then have them moved.&lt;/P&gt;&lt;P&gt;Your code is modified to show the preferred approach. Hope this helps&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/driskull/pen/ZEmoryK?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/driskull/pen/ZEmoryK?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2023 19:00:02 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2023-07-18T19:00:02Z</dc:date>
    <item>
      <title>Calcite Tabs in Expand Widget Throws Uncaught error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1308433#M81699</link>
      <description>&lt;P&gt;In HTML:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;calcite-card id="tab-container"&amp;gt;
      &amp;lt;calcite-tabs &amp;gt;   
        &amp;lt;calcite-tab-nav slot="title-group"&amp;gt;
            &amp;lt;calcite-tab-title selected&amp;gt;
                Watercraft
            &amp;lt;/calcite-tab-title&amp;gt;
            &amp;lt;calcite-tab-title&amp;gt;Automobiles&amp;lt;/calcite-tab-title&amp;gt;
            &amp;lt;calcite-tab-title&amp;gt;Aircrafts&amp;lt;/calcite-tab-title&amp;gt;
        &amp;lt;/calcite-tab-nav&amp;gt;
        &amp;lt;calcite-tab selected&amp;gt;
            &amp;lt;calcite-notice icon="embark" open&amp;gt;
                &amp;lt;div slot="message"&amp;gt;Recommended for coastal use&amp;lt;/div&amp;gt;
            &amp;lt;/calcite-notice&amp;gt;
        &amp;lt;/calcite-tab&amp;gt;
        &amp;lt;calcite-tab&amp;gt;
            &amp;lt;calcite-notice icon="car" open&amp;gt;
                &amp;lt;div slot="message"&amp;gt;A good choice for inland adventure&amp;lt;/div&amp;gt;
            &amp;lt;/calcite-notice&amp;gt;
        &amp;lt;/calcite-tab&amp;gt;
        &amp;lt;calcite-tab&amp;gt;
            &amp;lt;calcite-notice icon="plane" open&amp;gt;
                &amp;lt;div slot="message"&amp;gt;Cross continents quickly&amp;lt;/div&amp;gt;
            &amp;lt;/calcite-notice&amp;gt;
        &amp;lt;/calcite-tab&amp;gt;   
      &amp;lt;/calcite-tabs&amp;gt;
    &amp;lt;/calcite-card&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;In JS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;            let myExpand = new Expand({
            expandIconClass: "esri-icon-question",
            expandTooltip: "My Expand",
            view: view,
            content: document.getElementById("tab-container")
            });
            view.ui.add(myExpand, "bottom-right"); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upon execution of the JS, an uncaught TypeError appears.&lt;/P&gt;&lt;P&gt;3p-2e88e68d.entry.js:6 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')&lt;BR /&gt;at p-2e88e68d.entry.js:6:25550&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dirk_Vandervoort_0-1689470942751.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/75478iE3D71A7B40FD67F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dirk_Vandervoort_0-1689470942751.png" alt="Dirk_Vandervoort_0-1689470942751.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;No functionality is apparently lost, but there is that annoying exception in the console.&lt;/P&gt;&lt;P&gt;Have you seen this before? Can you help me handle it?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 01:15:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1308433#M81699</guid>
      <dc:creator>Dirk_Vandervoort</dc:creator>
      <dc:date>2023-07-17T01:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calcite Tabs in Expand Widget Throws Uncaught error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1308824#M81713</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please place the calcite components in div element and add set the Expand.content to the div. This got rid off the error.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 21:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1308824#M81713</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2023-07-17T21:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calcite Tabs in Expand Widget Throws Uncaught error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1308846#M81715</link>
      <description>&lt;P&gt;I cannot correct this issue by wrapping the calcite in a div and setting the expand.content to the div.&lt;/P&gt;&lt;P&gt;I've attached a simple app that has this error&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;Calcite Tabs in Expand&amp;lt;/title&amp;gt;

    &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.27/esri/css/main.css"/&amp;gt;
    &amp;lt;script type="module" src="https://js.arcgis.com/calcite-components/1.4.2/calcite.esm.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;link rel="stylesheet" type="text/css" href="https://js.arcgis.com/calcite-components/1.4.2/calcite.css" /&amp;gt;

    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;script src="https://js.arcgis.com/4.27/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
      require(["esri/views/MapView", "esri/WebMap", "esri/widgets/Expand"], (MapView, WebMap, Expand) =&amp;gt; { 
          const webmap = new WebMap({
            portalItem: {
              id: "e691172598f04ea8881cd2a4adaa45ba"
            }
          });
          const view = new MapView({
            map: webmap,
            container: "viewDiv"
          });
          view.when(async () =&amp;gt; {
            let myExpand = new Expand({
            expandIconClass: "esri-icon-question",
            expandTooltip: "My Expand",
            view: view,
            content: document.getElementById("my-tab-container"),
            id:"my-expand",
            group: "bottom-right"
            });
            view.ui.add(myExpand, "bottom-right"); 
        });
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div id="my-tab-container"&amp;gt;
      &amp;lt;calcite-card&amp;gt;
        &amp;lt;calcite-tabs it="the-tabs"&amp;gt;   
          &amp;lt;calcite-tab-nav slot="title-group" id="the-nav"&amp;gt;
              &amp;lt;calcite-tab-title selected id="tab01a"&amp;gt;Watercraft&amp;lt;/calcite-tab-title&amp;gt;
              &amp;lt;calcite-tab-title id="tab02a"&amp;gt;Automobiles&amp;lt;/calcite-tab-title&amp;gt;
              &amp;lt;calcite-tab-title id="tab03a"&amp;gt;Aircrafts&amp;lt;/calcite-tab-title&amp;gt;
          &amp;lt;/calcite-tab-nav&amp;gt;
          &amp;lt;calcite-tab selected&amp;gt;
              &amp;lt;calcite-notice icon="embark" open&amp;gt;
                  &amp;lt;div slot="message"&amp;gt;Recommended for coastal use&amp;lt;/div&amp;gt;
              &amp;lt;/calcite-notice&amp;gt;
          &amp;lt;/calcite-tab&amp;gt;
          &amp;lt;calcite-tab&amp;gt;
              &amp;lt;calcite-notice icon="car" open&amp;gt;
                  &amp;lt;div slot="message"&amp;gt;A good choice for inland adventure&amp;lt;/div&amp;gt;
              &amp;lt;/calcite-notice&amp;gt;
          &amp;lt;/calcite-tab&amp;gt;
          &amp;lt;calcite-tab&amp;gt;
              &amp;lt;calcite-notice icon="plane" open&amp;gt;
                  &amp;lt;div slot="message"&amp;gt;Cross continents quickly&amp;lt;/div&amp;gt;
              &amp;lt;/calcite-notice&amp;gt;
          &amp;lt;/calcite-tab&amp;gt;   
        &amp;lt;/calcite-tabs&amp;gt;
      &amp;lt;/calcite-card&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 17 Jul 2023 22:49:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1308846#M81715</guid>
      <dc:creator>Dirk_Vandervoort</dc:creator>
      <dc:date>2023-07-17T22:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calcite Tabs in Expand Widget Throws Uncaught error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1309242#M81723</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I talked to a coworker who is much more &amp;nbsp;experienced in this area.&lt;/P&gt;&lt;P&gt;You are getting the error because the tabs are first being rendered in the page and then being moved into the expand widget.&amp;nbsp;It would probably be better to not first create them in the page and then have them moved.&lt;/P&gt;&lt;P&gt;Your code is modified to show the preferred approach. Hope this helps&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/driskull/pen/ZEmoryK?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/driskull/pen/ZEmoryK?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 19:00:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/calcite-tabs-in-expand-widget-throws-uncaught/m-p/1309242#M81723</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2023-07-18T19:00:02Z</dc:date>
    </item>
  </channel>
</rss>

