<?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: Close button for widgets in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1159900#M76886</link>
    <description>&lt;P&gt;I'm guessing the Editor widget hasn't completed loading yet.&amp;nbsp; Look at this response I just gave about attaching to the ListView 3 ellipse button.&amp;nbsp; If you look at the last entry, in the code example I attach to the widget in the same fashion, but I had to put it in a 'when' event check to make sure it was fully loaded before checking for the classname.&lt;/P&gt;&lt;P&gt;&lt;A title="ListItem Ellipsis Expanded" href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/listitem-ellipsis-expanded-event/td-p/1157249" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-javascript-questions/listitem-ellipsis-expanded-event/td-p/1157249&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2022 15:36:23 GMT</pubDate>
    <dc:creator>JeffreyWilkerson</dc:creator>
    <dc:date>2022-03-31T15:36:23Z</dc:date>
    <item>
      <title>Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1105559#M74904</link>
      <description>&lt;P&gt;THe widgets from JS API 4.x (Layerlist, Bookmarks...) are shown with no close button. Some of them are using the Expand widget to minimize them. If the widget is posted on a toolbar, there is no way to close them.&lt;/P&gt;&lt;P&gt;I created a close button for a custom widget, but for a widget template from the API library how to insert a close button? CSS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 15:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1105559#M74904</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-10-07T15:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1105587#M74905</link>
      <description>&lt;P&gt;In one of Esri's Editor widget examples (&lt;A title="Editor popup edit action" href="https://developers.arcgis.com/javascript/latest/sample-code/popup-editaction/" target="_self"&gt;Editor popup edit action&lt;/A&gt;&amp;nbsp;), they show how you can get access to the widget's dom node and make changes:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;let arrComp = editorNode.getElementsByClassName("esri-editor__back-button esri-interactive");
                       
if (arrComp.length === 1) {
    // Add a tooltip for the back button
    arrComp[0].setAttribute("title", "Cancel edits, return to popup");
    // Add a listerner to listen for when the editor's back button is clicked
    arrComp[0].addEventListener('click', function (evt) {...

or

// Remove 'Delete' button from bottom of Editor widget
let btnDelete = editorNode.getElementsByClassName("esri-editor__control-button esri-button esri-button--tertiary");
if (btnDelete.length === 1) { btnDelete[0].style.display = "none"; }&lt;/LI-CODE&gt;&lt;P&gt;Maybe you can access a node in the particular widget you are interested in and then attach your close button through the Dom.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 15:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1105587#M74905</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2021-10-07T15:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1159802#M76878</link>
      <description>&lt;P&gt;Hi, I'm using&amp;nbsp;&lt;SPAN&gt;The widgets from JS API 4.23 but it can not get element of the button,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;even it use in setTimeout with 3 seconds...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 10:04:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1159802#M76878</guid>
      <dc:creator>SyNguyen</dc:creator>
      <dc:date>2022-03-31T10:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1159900#M76886</link>
      <description>&lt;P&gt;I'm guessing the Editor widget hasn't completed loading yet.&amp;nbsp; Look at this response I just gave about attaching to the ListView 3 ellipse button.&amp;nbsp; If you look at the last entry, in the code example I attach to the widget in the same fashion, but I had to put it in a 'when' event check to make sure it was fully loaded before checking for the classname.&lt;/P&gt;&lt;P&gt;&lt;A title="ListItem Ellipsis Expanded" href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/listitem-ellipsis-expanded-event/td-p/1157249" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-javascript-questions/listitem-ellipsis-expanded-event/td-p/1157249&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 15:36:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1159900#M76886</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2022-03-31T15:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1166022#M77059</link>
      <description>&lt;P&gt;Thank you Jeffey for reply!&lt;/P&gt;&lt;P&gt;I don't&amp;nbsp; know how to put the Editor in a 'when'. But i try to set time out in 10 second and it still&amp;nbsp;&lt;SPAN&gt;can not get element of the button. I run test in sandbox with&amp;nbsp;popup-editaction sample.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=popup-editaction" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=popup-editaction&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My test code in funtion editThis:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;setTimeout(() =&amp;gt; {
              // Use the editor's back button as a way to cancel out of editing
              let arrComp = editor.domNode.getElementsByClassName(
                "esri-editor__back-button esri-interactive"
              );
              alert(arrComp.length);
              if (arrComp.length === 1) {
                // Add a tooltip for the back button
                arrComp[0].setAttribute(
                  "title",
                  "Cancel edits, return to popup"
                );
                // Add a listener to listen for when the editor's back button is clicked
                arrComp[0].addEventListener("click", (evt) =&amp;gt; {
                  alert("back");
                  // Prevent the default behavior for the back button and instead remove the editor and reopen the popup
                  evt.preventDefault();
                  view.ui.remove(editor);
                  view.popup.open({
                    features: features
                  });
                });
              }
            }, 10000);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 09:42:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1166022#M77059</guid>
      <dc:creator>SyNguyen</dc:creator>
      <dc:date>2022-04-20T09:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1166291#M77066</link>
      <description>&lt;P&gt;SyNguyen,&lt;/P&gt;&lt;P&gt;Not sure if you are trying to use this sample directly or not, but at 4.23 Esri has modified the Editor widget to be driven by Calcite theming instead of the CSS they had before. That makes the 'esri-editor__back-button esri-interactive' classes that this sample relied on non-existent. I have opened a ticket with this with Esri but so far nothing's been done about it.&amp;nbsp; Since I have an application that relies on this as well, I am hoping that Esri can come up with a solution that can pull out the section of the Editor Widget to tie this button change to, otherwise I'm going to have to stay on pre 4.23 versions (and never get the benefit of a Date popup calendar) or write my own.&lt;/P&gt;&lt;P&gt;If you are trying to use a previous version and still having difficulty then let me know and I can try to help.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 18:11:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1166291#M77066</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2022-04-20T18:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1166489#M77078</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;JeffreyWilkerson very much,&lt;/P&gt;&lt;P&gt;I downgrade to 4.22 version and it's work&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 01:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1166489#M77078</guid>
      <dc:creator>SyNguyen</dc:creator>
      <dc:date>2022-04-21T01:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Close button for widgets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1204450#M78363</link>
      <description>&lt;P&gt;it is the fault of&amp;nbsp;&lt;SPAN&gt;shadowRoot！the querySelector can not find the element which under the shadowRoot !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you need to find the parentDom of the shadowRoot first!&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  let arrComp = this.Editor.domNode.getElementsByTagName('calcite-panel')[1].shadowRoot.querySelector(".back-button")&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Aug 2022 09:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/close-button-for-widgets/m-p/1204450#M78363</guid>
      <dc:creator>greatathrun</dc:creator>
      <dc:date>2022-08-19T09:47:15Z</dc:date>
    </item>
  </channel>
</rss>

