<?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: Search widget when single source in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-when-single-source/m-p/1008845#M71091</link>
    <description>&lt;P&gt;Hopefully you can see the attached images&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2020 11:34:07 GMT</pubDate>
    <dc:creator>RayMckaig</dc:creator>
    <dc:date>2020-12-11T11:34:07Z</dc:date>
    <item>
      <title>Search widget when single source</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-when-single-source/m-p/1008428#M71078</link>
      <description>&lt;P&gt;I have a problem with the Search widget when I only have one source.&lt;/P&gt;&lt;P&gt;In my application the sources array is updated depending on what layers I dynamically add to the map.&lt;/P&gt;&lt;P&gt;I have three layers that can be added using two visual elements. The first option ("Fields") adds one layer and the other ("Blocks") adds two. After the appropriate layers are added, I execute this code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fieldBlockSearchWidget.set("activeSourceIndex", 0);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;fieldBlockSearchWidget.set("enableSourcesMenu", blockLayerVisible);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;fieldBlockSearchWidget.set("enableSearchingAll", blockLayerVisible);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;fieldBlockSearchWidget.set("sources", sources);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;fieldBlockSearchWidget.startup();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I've found that when there is only one source, the sources dropdown is empty and only shows an outline.&lt;/P&gt;&lt;P&gt;I've tried setting the "enableSroucesMenu" attribute to false when there's only one layer to no avail.&lt;/P&gt;&lt;P&gt;The styling of the sources button does change when there's only one source but it's still visible.&lt;/P&gt;&lt;P&gt;Is there something I'm missing?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 13:51:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-when-single-source/m-p/1008428#M71078</guid>
      <dc:creator>RayMckaig</dc:creator>
      <dc:date>2020-12-10T13:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Search widget when single source</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-when-single-source/m-p/1008845#M71091</link>
      <description>&lt;P&gt;Hopefully you can see the attached images&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 11:34:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-when-single-source/m-p/1008845#M71091</guid>
      <dc:creator>RayMckaig</dc:creator>
      <dc:date>2020-12-11T11:34:07Z</dc:date>
    </item>
  </channel>
</rss>

