<?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: Disable popup on web component feature search in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697242#M88368</link>
    <description>&lt;P&gt;I got a chance to play around with this and saw what you are talking about.&amp;nbsp; It looks like you are using a popup in AGOL, and using that SAME layer for your search in the SDK.&amp;nbsp; The SDK will assign the popupEnable globally to that layer.&amp;nbsp; You created a bit of a mess mixing the two on the same layer.&amp;nbsp; The only way I could figure out is to disable all popups, then recreating the popup all over again.&amp;nbsp; I have a feeling it will buggy, AGOL settings might keep trying to re-enter the chat.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    view.map.add(muni);

    const search = document.querySelector("arcgis-search");
    await search.componentOnReady();

    search.sources = [{
      layer: muni,
      searchFields: ["NAME"],
      displayField: "NAME",
      exactMatch: false,
      outFields: ["NAME"],
      name: "Town",
      placeholder: "search by town",
      popupEnabled: false   
    }];

    // Stop ALL popups.
    view.popup.autoOpenEnabled = false;

    // Track when search is happening
    let fromSearch = false;

    search.addEventListener("arcgisSearchSelectResult", async (event) =&amp;gt; {
      fromSearch = true;

      const result = event.detail.result;

      await view.goTo(result.extent || result.feature.geometry);

    });

    // Kill popup AFTER it appears
    reactiveUtils.when(
      () =&amp;gt; view.popup?.visible === true,
      () =&amp;gt; {
        if (fromSearch) {
          view.popup.visible = false;  
          fromSearch = false;
        }
      }
    );

    // restore popup
    view.on("click", async (event) =&amp;gt; {
      const hit = await view.hitTest(event);

      const result = hit.results.find(r =&amp;gt; r.graphic.layer === muni);

      if (result) {
        view.popup.open({
          features: [result.graphic],
          location: event.mapPoint
        });
      }
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2026 14:47:22 GMT</pubDate>
    <dc:creator>MatthewDriscoll</dc:creator>
    <dc:date>2026-04-20T14:47:22Z</dc:date>
    <item>
      <title>Disable popup on web component feature search</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1696983#M88363</link>
      <description>&lt;P&gt;I can't seem to disable the popup on the search component for a feature layer. Here is a simple &lt;A href="https://codepen.io/underjollyroger/pen/KwgEWbp" target="_self"&gt;sample&lt;/A&gt;. To recreate my problem search "man". Click MANHATTAN under town. There's a popup on this feature I can't get rid of.&lt;/P&gt;&lt;P&gt;I've been looking and trying all the relevant properties I can find for both the &lt;EM&gt;arcgis-search&lt;/EM&gt; and &lt;EM&gt;arcgis-features&lt;/EM&gt;&amp;nbsp;to disable the popup. Nothing worked sofar.&amp;nbsp;I've included &lt;EM&gt;popup-disabled&lt;/EM&gt;&amp;nbsp;in the &lt;EM&gt;arcgis-map&lt;/EM&gt; component too.&amp;nbsp;Is there a&amp;nbsp; way to stop the popup in the code and not on the feature itself in AGOL?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT:&amp;nbsp;&lt;/STRONG&gt;I should add in my actual app I have other feature layers that I want popups enabled so I can't really disable them in the &lt;EM&gt;arcgis-map&lt;/EM&gt; component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 16:14:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1696983#M88363</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2026-04-17T16:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Disable popup on web component feature search</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697046#M88364</link>
      <description>&lt;P&gt;&lt;SPAN&gt;'popupEnabled: &lt;/SPAN&gt;&lt;SPAN class=""&gt;false'&lt;/SPAN&gt;&amp;nbsp;should work fine.&amp;nbsp; You place it in the individual search component, the other layers should not be affected.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;search.sources = [
  {
    layer: muni,
    searchFields: ["NAME"],
    displayField: "NAME",
    exactMatch: false,
    outFields: ["NAME"],
    name: "Town",
    placeholder: "search by town",
    popupEnabled: false   // ******
  },
  {
    name: "ArcGIS World Geocoding Service",
    placeholder: "example: Nuuk, GRL",
    singleLineFieldName: "SingleLine",
    apiKey: "YOUR_ACCESS_TOKEN",
    url: "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer",
    popupEnabled: false
  }
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 20:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697046#M88364</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-04-17T20:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Disable popup on web component feature search</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697242#M88368</link>
      <description>&lt;P&gt;I got a chance to play around with this and saw what you are talking about.&amp;nbsp; It looks like you are using a popup in AGOL, and using that SAME layer for your search in the SDK.&amp;nbsp; The SDK will assign the popupEnable globally to that layer.&amp;nbsp; You created a bit of a mess mixing the two on the same layer.&amp;nbsp; The only way I could figure out is to disable all popups, then recreating the popup all over again.&amp;nbsp; I have a feeling it will buggy, AGOL settings might keep trying to re-enter the chat.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    view.map.add(muni);

    const search = document.querySelector("arcgis-search");
    await search.componentOnReady();

    search.sources = [{
      layer: muni,
      searchFields: ["NAME"],
      displayField: "NAME",
      exactMatch: false,
      outFields: ["NAME"],
      name: "Town",
      placeholder: "search by town",
      popupEnabled: false   
    }];

    // Stop ALL popups.
    view.popup.autoOpenEnabled = false;

    // Track when search is happening
    let fromSearch = false;

    search.addEventListener("arcgisSearchSelectResult", async (event) =&amp;gt; {
      fromSearch = true;

      const result = event.detail.result;

      await view.goTo(result.extent || result.feature.geometry);

    });

    // Kill popup AFTER it appears
    reactiveUtils.when(
      () =&amp;gt; view.popup?.visible === true,
      () =&amp;gt; {
        if (fromSearch) {
          view.popup.visible = false;  
          fromSearch = false;
        }
      }
    );

    // restore popup
    view.on("click", async (event) =&amp;gt; {
      const hit = await view.hitTest(event);

      const result = hit.results.find(r =&amp;gt; r.graphic.layer === muni);

      if (result) {
        view.popup.open({
          features: [result.graphic],
          location: event.mapPoint
        });
      }
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2026 14:47:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697242#M88368</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-04-20T14:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Disable popup on web component feature search</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697320#M88370</link>
      <description>&lt;P&gt;Sorry to put you through that. Your first response worked. I swore I tried that.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2026 20:20:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697320#M88370</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2026-04-20T20:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Disable popup on web component feature search</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697322#M88371</link>
      <description>&lt;P&gt;Glad to help.&amp;nbsp; I also tried that and didn't get the results I expected.&amp;nbsp; No worries, these exercises help me keep up with things outside my normal day to day stuff.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2026 20:26:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-popup-on-web-component-feature-search/m-p/1697322#M88371</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-04-20T20:26:11Z</dc:date>
    </item>
  </channel>
</rss>

