<?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: In JavaScript 4.10, the second Search Widgets changes the properties on the main one in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549769#M51212</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a codepen too:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/driskull/pen/zyRjqE?editors=1100" title="https://codepen.io/driskull/pen/zyRjqE?editors=1100"&gt;A Pen by Matt Driscoll&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jan 2019 23:17:09 GMT</pubDate>
    <dc:creator>MattDriscoll</dc:creator>
    <dc:date>2019-01-03T23:17:09Z</dc:date>
    <item>
      <title>In JavaScript 4.10, the second Search Widgets changes the properties on the main one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549767#M51210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I switching to JavaScript 4.10, the Search widget acts funny.&amp;nbsp; I have two Search widgets in my app and when the second is activated it changes the properties on the main one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this is the newest api, presumably this is a bug.&amp;nbsp; When I switch to 4.8 or 4.9 it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached some screenshots showing what I'm talking about.&amp;nbsp; The placeholder for the first widgets changes when the second is created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 18:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549767#M51210</guid>
      <dc:creator>DanielWebb</dc:creator>
      <dc:date>2019-01-03T18:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: In JavaScript 4.10, the second Search Widgets changes the properties on the main one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549768#M51211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for bringing this to our attention. This is a bug with the Search widget sharing the same sources. In order to fix this, can you add the following line after you create your search widgets?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;searchWidget&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;viewModel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;_set&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"allSources"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; searchWidget&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;viewModel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;allSources&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;clone&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will make a clone of the `allSources` collection which will allow you to modify it without affecting the other search widget. Feel free to add this one liner to the other widget as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'll get this fixed for 4.11.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 23:14:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549768#M51211</guid>
      <dc:creator>MattDriscoll</dc:creator>
      <dc:date>2019-01-03T23:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: In JavaScript 4.10, the second Search Widgets changes the properties on the main one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549769#M51212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a codepen too:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/driskull/pen/zyRjqE?editors=1100" title="https://codepen.io/driskull/pen/zyRjqE?editors=1100"&gt;A Pen by Matt Driscoll&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 23:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549769#M51212</guid>
      <dc:creator>MattDriscoll</dc:creator>
      <dc:date>2019-01-03T23:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: In JavaScript 4.10, the second Search Widgets changes the properties on the main one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549770#M51213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If a source has resultSymbol, then it causes an error.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;ERROR &lt;SPAN class="" data-link-actor-id="server1.conn6.child1/obj788"&gt;TypeError: "this.resultSymbol.clone is not a function"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" data-link-actor-id="server1.conn6.child1/obj788"&gt;clone &lt;SPAN class="" title="View source in debugger → https://js.arcgis.com/4.10/esri/widgets/Search.js:135:396"&gt;/4.10/esri/widgets/Search.js:135:396&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2019 16:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549770#M51213</guid>
      <dc:creator>MikkLauringson</dc:creator>
      <dc:date>2019-01-14T16:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: In JavaScript 4.10, the second Search Widgets changes the properties on the main one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549771#M51214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Mikk, can you make sure that the resultSymbol is an instance of a symbol and not an object? What symbol type is it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2019 17:02:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549771#M51214</guid>
      <dc:creator>MattDriscoll</dc:creator>
      <dc:date>2019-01-14T17:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: In JavaScript 4.10, the second Search Widgets changes the properties on the main one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549772#M51215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it was an object. It works with instance. Also other solution was to set it after cloning.&lt;/P&gt;&lt;P&gt;resultSymbol: {type: 'picture-marker', ...}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2019 17:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549772#M51215</guid>
      <dc:creator>MikkLauringson</dc:creator>
      <dc:date>2019-01-14T17:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: In JavaScript 4.10, the second Search Widgets changes the properties on the main one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549773#M51216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Matt!&amp;nbsp; That seems to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-javascript-4-10-the-second-search-widgets/m-p/549773#M51216</guid>
      <dc:creator>DanielWebb</dc:creator>
      <dc:date>2019-01-15T21:40:29Z</dc:date>
    </item>
  </channel>
</rss>

