<?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 Issue with Layer Panel Color Update on Movement in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-layer-panel-color-update-on-movement/m-p/1356684#M83009</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a function that detects if a layer has a definitionExpression and then changes the color of the layer panel. It's working fine, except when I move the layer panels. Although I can see in the console that it gets the correct element, it does not update the color of the element.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I feel that when I move it, it creates another ID for the component and then changes it back after I finish moving.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;   reactiveUtils.watch(
        () =&amp;gt; layerList.operationalItems.map(item =&amp;gt; item.layer),
        (layers) =&amp;gt; {
          layers.map(layer =&amp;gt; {
            if (!excludedTitles.includes(layer.title) &amp;amp;&amp;amp; layer["definitionExpression"]) {
              const layerIdParts = layer.id?.split("-layer-");
              const layerBaseId = layerIdParts ? layerIdParts[0] : '';
              if (!layerBaseId) return;
              const selector = `[data-layer-uid*="${layerBaseId}-object-"]`;
              const layerListElement = document.querySelector(selector);
              if (!layerListElement) return;
              layerListElement.classList['add']("filter-list-panel");
            }
          });
        }
    );&lt;/LI-CODE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 05:18:29 GMT</pubDate>
    <dc:creator>mukecz1</dc:creator>
    <dc:date>2023-12-05T05:18:29Z</dc:date>
    <item>
      <title>Issue with Layer Panel Color Update on Movement</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-layer-panel-color-update-on-movement/m-p/1356684#M83009</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a function that detects if a layer has a definitionExpression and then changes the color of the layer panel. It's working fine, except when I move the layer panels. Although I can see in the console that it gets the correct element, it does not update the color of the element.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I feel that when I move it, it creates another ID for the component and then changes it back after I finish moving.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;   reactiveUtils.watch(
        () =&amp;gt; layerList.operationalItems.map(item =&amp;gt; item.layer),
        (layers) =&amp;gt; {
          layers.map(layer =&amp;gt; {
            if (!excludedTitles.includes(layer.title) &amp;amp;&amp;amp; layer["definitionExpression"]) {
              const layerIdParts = layer.id?.split("-layer-");
              const layerBaseId = layerIdParts ? layerIdParts[0] : '';
              if (!layerBaseId) return;
              const selector = `[data-layer-uid*="${layerBaseId}-object-"]`;
              const layerListElement = document.querySelector(selector);
              if (!layerListElement) return;
              layerListElement.classList['add']("filter-list-panel");
            }
          });
        }
    );&lt;/LI-CODE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 05:18:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-layer-panel-color-update-on-movement/m-p/1356684#M83009</guid>
      <dc:creator>mukecz1</dc:creator>
      <dc:date>2023-12-05T05:18:29Z</dc:date>
    </item>
  </channel>
</rss>

