<?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: Unable to use Tabs Component in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106742#M2955</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/4655"&gt;@TonghuiMing&lt;/a&gt;&amp;nbsp;, thank you very much for your reply. This helped me solved the problem. I was using the &lt;STRONG&gt;&amp;lt;Tabs&amp;gt;&lt;/STRONG&gt; component in a subcomponent that was created using ReactDOM.render inside a widget (I need to do it this way for this particular component). I was able to use other Jimu UI components here just fine (like &lt;STRONG&gt;&amp;lt;Alert&amp;gt;&lt;/STRONG&gt; or &lt;STRONG&gt;&amp;lt;Button&amp;gt;&lt;/STRONG&gt;), so that's why I thought it was a problem with the &lt;STRONG&gt;&amp;lt;Tabs&amp;gt;&lt;/STRONG&gt; in particular since other components were fine. It seems that those other components don't have the dependency (or handle it somehow when it's missing).&lt;/P&gt;&lt;P&gt;This is the code to make this work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ReactDOM.render(
    &amp;lt;ReactRedux.Provider store={getAppStore()}&amp;gt;
        &amp;lt;ThemeProvider theme={this.props.theme}&amp;gt;
            &amp;lt;CutomComponent /&amp;gt;
		&amp;lt;/ThemeProvider&amp;gt;
    &amp;lt;/ReactRedux.Provider&amp;gt;,
    div);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(the &amp;lt;CustomComponent&amp;gt; can now had &amp;lt;Tabs&amp;gt; inside and it will work.&lt;/P&gt;&lt;P&gt;Just as a suggestion, you could note those dependencies on the storybook&amp;nbsp; (&lt;A href="https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-index-tabs-tabs--basic" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-index-tabs-tabs--basic&lt;/A&gt;), as it gives the impression that the Jimu UI library can be used in any context.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Tue, 12 Oct 2021 16:10:35 GMT</pubDate>
    <dc:creator>AlejandroMari1</dc:creator>
    <dc:date>2021-10-12T16:10:35Z</dc:date>
    <item>
      <title>Unable to use Tabs Component</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106020#M2929</link>
      <description>&lt;P&gt;Hello! I'm trying to use the &amp;lt;Tabs&amp;gt; component in a custom widget on ExB dev edition 1.5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The component is defined on the ExB storybook (&lt;A href="https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-index-tabs-tabs--basic" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-index-tabs-tabs--basic&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;The Tabs don't load, and the console throws this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;react-dom.js:9 
        
       TypeError: Cannot destructure property 'variants' of 'x' as it is undefined.
    at Ur (index.js:formatted:13737)
    at Sv.getComponentStyles (index.js:114)
    at index.js:116
    at Vt (index.js:56)
    at Wt (index.js:56)
    at index.js:56
    at index.js:56
    at no (react-dom.js:9)
    at Ro (react-dom.js:9)
    at Vu (react-dom.js:9)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code inside the render function is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;div&amp;gt;
    &amp;lt;Tabs
        defaultValue="tab-1"
        onChange={() =&amp;gt; { }}
        onClose={() =&amp;gt; { }}
        type="underline"
        value="tab-1"
        className='tab-flex'
    &amp;gt;
        &amp;lt;Tab
            key="tab-1"
            id="tab-1"
            title="Tab 1"
            className='text-truncate tag-size'
            closeable={false}
        &amp;gt;
            &amp;lt;div className='mt-2'&amp;gt;Content 1&amp;lt;/div&amp;gt;
        &amp;lt;/Tab&amp;gt;
        &amp;lt;Tab
            key="tab-2"
            id="tab-2"
            title="Tab 2"
            className='text-truncate tag-size'
            closeable={false}
        &amp;gt;
            &amp;lt;div className='mt-2'&amp;gt;Content 2&amp;lt;/div&amp;gt;
        &amp;lt;/Tab&amp;gt;
    &amp;lt;/Tabs&amp;gt;
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts? Even a copy-paste from the storybook samples fails with the same error.&lt;/P&gt;&lt;P&gt;Has anyone been able to make this work?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 17:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106020#M2929</guid>
      <dc:creator>AlejandroMari1</dc:creator>
      <dc:date>2021-10-08T17:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Tabs Component</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106034#M2930</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/140361"&gt;@AlejandroMari1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what works for me in 1.5.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div&amp;gt;
    &amp;lt;Tabs
        defaultValue={"tab-1"}
        onChange={() =&amp;gt; { }}
        onClose={() =&amp;gt; { }}
        type={"underline"}
        value={"tab-1"}
        className='tab-flex'
    &amp;gt;
        &amp;lt;Tab
            id="tab-1"
            title={"Tab 1"}
            className='text-truncate tag-size'
            closeable={false}
        &amp;gt;
            &amp;lt;div className='mt-2'&amp;gt;Content 1&amp;lt;/div&amp;gt;
        &amp;lt;/Tab&amp;gt;
        &amp;lt;Tab
            id="tab-2"
            title={"Tab 2"}
            className='text-truncate tag-size'
            closeable={false}
        &amp;gt;
            &amp;lt;div className='mt-2'&amp;gt;Content 2&amp;lt;/div&amp;gt;
        &amp;lt;/Tab&amp;gt;
    &amp;lt;/Tabs&amp;gt;
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Of course make sure to import&amp;nbsp; {Tabs, Tab} from 'jimu-ui';&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 18:02:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106034#M2930</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-10-08T18:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Tabs Component</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106079#M2931</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;&amp;nbsp;. I just copy pasted your code and I get the same error still... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 19:22:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106079#M2931</guid>
      <dc:creator>AlejandroMari1</dc:creator>
      <dc:date>2021-10-08T19:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Tabs Component</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106128#M2932</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/140361"&gt;@AlejandroMari1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can not explain why you are getting this error as I can use paste this code into my widget and it functions fine. You must have other issues in your widgets code.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 20:21:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106128#M2932</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-10-08T20:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Tabs Component</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106324#M2944</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/140361"&gt;@AlejandroMari1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After discussing the problem with developers on the team, here is some information for your reference -&lt;/P&gt;&lt;P&gt;We've tried the Tabs component inside ExB v1.5 and it works fine, the code and result are as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TonghuiMing_0-1633933466241.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24927i67F72E8560C173E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TonghuiMing_0-1633933466241.png" alt="TonghuiMing_0-1633933466241.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TonghuiMing_1-1633933476736.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24928iD7AF9360695FDF81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TonghuiMing_1-1633933476736.png" alt="TonghuiMing_1-1633933476736.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The issue you've encountered seems to relate to how this component was being used. Telling from the error, it happened when the component read theme variables - not getting the correct ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To ensure ExB components work fine, there must be a &lt;EM&gt;&lt;STRONG&gt;ThemeProvider&lt;/STRONG&gt;&lt;/EM&gt; at the top level of your codes (please refer to more information about React context &lt;A href="https://reactjs.org/docs/context.html" target="_blank" rel="noopener"&gt;&lt;EM&gt;here&lt;/EM&gt;&lt;/A&gt;) to provide the needed theme variables. If you are in the correct environment, or your app is generated from ExB, this ThemeProvider should have been defined already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another possibility is that your custom widget had another ThemeProvider, which was giving the wrong theme variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope the above information can help in some way. Feel free to provide more information if you'd like as well.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 06:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106324#M2944</guid>
      <dc:creator>TonghuiMing</dc:creator>
      <dc:date>2021-10-11T06:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Tabs Component</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106742#M2955</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/4655"&gt;@TonghuiMing&lt;/a&gt;&amp;nbsp;, thank you very much for your reply. This helped me solved the problem. I was using the &lt;STRONG&gt;&amp;lt;Tabs&amp;gt;&lt;/STRONG&gt; component in a subcomponent that was created using ReactDOM.render inside a widget (I need to do it this way for this particular component). I was able to use other Jimu UI components here just fine (like &lt;STRONG&gt;&amp;lt;Alert&amp;gt;&lt;/STRONG&gt; or &lt;STRONG&gt;&amp;lt;Button&amp;gt;&lt;/STRONG&gt;), so that's why I thought it was a problem with the &lt;STRONG&gt;&amp;lt;Tabs&amp;gt;&lt;/STRONG&gt; in particular since other components were fine. It seems that those other components don't have the dependency (or handle it somehow when it's missing).&lt;/P&gt;&lt;P&gt;This is the code to make this work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ReactDOM.render(
    &amp;lt;ReactRedux.Provider store={getAppStore()}&amp;gt;
        &amp;lt;ThemeProvider theme={this.props.theme}&amp;gt;
            &amp;lt;CutomComponent /&amp;gt;
		&amp;lt;/ThemeProvider&amp;gt;
    &amp;lt;/ReactRedux.Provider&amp;gt;,
    div);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(the &amp;lt;CustomComponent&amp;gt; can now had &amp;lt;Tabs&amp;gt; inside and it will work.&lt;/P&gt;&lt;P&gt;Just as a suggestion, you could note those dependencies on the storybook&amp;nbsp; (&lt;A href="https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-index-tabs-tabs--basic" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-index-tabs-tabs--basic&lt;/A&gt;), as it gives the impression that the Jimu UI library can be used in any context.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 16:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/unable-to-use-tabs-component/m-p/1106742#M2955</guid>
      <dc:creator>AlejandroMari1</dc:creator>
      <dc:date>2021-10-12T16:10:35Z</dc:date>
    </item>
  </channel>
</rss>

