<?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 Adding new objects-array config element that will look nice, both in &amp;quot;Content&amp;quot; tab and in application config in Experience Builder Custom Widgets</title>
    <link>https://community.esri.com/t5/experience-builder-custom-widgets/adding-new-objects-array-config-element-that-will/m-p/1458120#M310</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I adapted arcgis-map widget to make it one of my custom widgets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the development ide, in arcgis-map "Content" tab (which is handled by setting.tsx), I added a new config element, which is a json array of objects, so in the text area I write it:&lt;BR /&gt;[&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string1-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param2":"string1-2",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param3":250},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param2": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param3":100&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;]&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I managed that it will work well, but there is an "ugliness" problem:&lt;BR /&gt;When I create and expand the zip file, then:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the application config&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it appears as if it is a &lt;STRONG&gt;string&lt;/STRONG&gt;:&lt;BR /&gt;"newElement": "[\n&amp;nbsp; {\n&amp;nbsp; &amp;nbsp; \"param1\": \"string1-1\",\n&amp;nbsp; &amp;nbsp; \"param2\": \"string1-2\",\n&amp;nbsp; &amp;nbsp; \"param3\": 10\n },\n&amp;nbsp; &amp;nbsp;{\n&amp;nbsp; &amp;nbsp; \"param1\": \"string2-1\",\n&amp;nbsp; &amp;nbsp; \"param2\": \"string2-2\",\n&amp;nbsp; &amp;nbsp; \"param3\": 200\n&amp;nbsp; }\n]"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I prefer that the new config element will appear in the application config as an &lt;STRONG&gt;array of&amp;nbsp;objects&lt;/STRONG&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"newElement": [&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string1-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param2":"string1-2",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param3":250},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param2": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param3":100&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To sum up in other words - I need that the text-area in "Content" tab will refer it as a string,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;while in the created zip and hence in the application config file, it will be referred as an array of objects&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2024 14:16:34 GMT</pubDate>
    <dc:creator>MichaelLev</dc:creator>
    <dc:date>2024-05-13T14:16:34Z</dc:date>
    <item>
      <title>Adding new objects-array config element that will look nice, both in "Content" tab and in application config</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/adding-new-objects-array-config-element-that-will/m-p/1458120#M310</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I adapted arcgis-map widget to make it one of my custom widgets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the development ide, in arcgis-map "Content" tab (which is handled by setting.tsx), I added a new config element, which is a json array of objects, so in the text area I write it:&lt;BR /&gt;[&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string1-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param2":"string1-2",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param3":250},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param2": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param3":100&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;]&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I managed that it will work well, but there is an "ugliness" problem:&lt;BR /&gt;When I create and expand the zip file, then:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the application config&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it appears as if it is a &lt;STRONG&gt;string&lt;/STRONG&gt;:&lt;BR /&gt;"newElement": "[\n&amp;nbsp; {\n&amp;nbsp; &amp;nbsp; \"param1\": \"string1-1\",\n&amp;nbsp; &amp;nbsp; \"param2\": \"string1-2\",\n&amp;nbsp; &amp;nbsp; \"param3\": 10\n },\n&amp;nbsp; &amp;nbsp;{\n&amp;nbsp; &amp;nbsp; \"param1\": \"string2-1\",\n&amp;nbsp; &amp;nbsp; \"param2\": \"string2-2\",\n&amp;nbsp; &amp;nbsp; \"param3\": 200\n&amp;nbsp; }\n]"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I prefer that the new config element will appear in the application config as an &lt;STRONG&gt;array of&amp;nbsp;objects&lt;/STRONG&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"newElement": [&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string1-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param2":"string1-2",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param3":250},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "param1": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param2": "string2-1",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"param3":100&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To sum up in other words - I need that the text-area in "Content" tab will refer it as a string,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;while in the created zip and hence in the application config file, it will be referred as an array of objects&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 14:16:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/adding-new-objects-array-config-element-that-will/m-p/1458120#M310</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2024-05-13T14:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new objects-array config element that will look nice, both in "Content" tab and in application config</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/adding-new-objects-array-config-element-that-will/m-p/1459049#M312</link>
      <description>&lt;P&gt;I solved it.&lt;BR /&gt;The new config element type if array of objects.&lt;/P&gt;&lt;P&gt;Only in setting.tsx in render(),&lt;BR /&gt;I do JSON.stringify(element, null, 2) in order to display it nicely in the TextArea in "Content" tab&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 16:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/adding-new-objects-array-config-element-that-will/m-p/1459049#M312</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2024-05-13T16:30:16Z</dc:date>
    </item>
  </channel>
</rss>

