<?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 custom Infowindow becomes empty if multiple features selected and infowindow toggle button used in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-infowindow-becomes-empty-if-multiple/m-p/456839#M42169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on custom infowindow where I am configuring empty Popup for given layer in WebMap with just title to begin with. Then I am adding custom content to said infowindow in runtime using below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works nice if I have only one feature selected. If I happen to click where two features gets selected, I get option of&amp;nbsp;toggle&amp;nbsp;in infowindow but when I toggle between two, then I loose all custom constructed and infowindow just shows title which was configured in WebMap. What can I do retain or am I missing something? whole code is in 'PostCreate' method of widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.map.infoWindow.on("set-features", function () {&lt;BR /&gt; if (this.map.infoWindow.features.length &amp;gt; 0) {&lt;BR /&gt; array.forEach(this.map.infoWindow.features, lang.hitch(this, function (feature) { &lt;BR /&gt; if (feature) { &lt;BR /&gt; var holderdiv = domConstruct.create("div", { "style": "height: 10px;" }, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; var hr = domConstruct.create("hr", null, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; var holderdiv2 = domConstruct.create("div", { "style": "height: 10px;" }, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; var link = domConstruct.create("a", {&lt;BR /&gt; "style": "display: block;",&lt;BR /&gt; "class": "action",&lt;BR /&gt; "id": "relatedLink",&lt;BR /&gt; "innerHTML": "test link", //text that appears in the popup for the link &lt;BR /&gt; "href": "javascript: void(0);"&lt;BR /&gt; }, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; on(link, "click", function () {&lt;BR /&gt; //some code&lt;BR /&gt; });&lt;BR /&gt; } &lt;BR /&gt; }));&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Nov 2019 09:55:11 GMT</pubDate>
    <dc:creator>AbhijeetKulkarni</dc:creator>
    <dc:date>2019-11-29T09:55:11Z</dc:date>
    <item>
      <title>custom Infowindow becomes empty if multiple features selected and infowindow toggle button used</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-infowindow-becomes-empty-if-multiple/m-p/456839#M42169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on custom infowindow where I am configuring empty Popup for given layer in WebMap with just title to begin with. Then I am adding custom content to said infowindow in runtime using below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works nice if I have only one feature selected. If I happen to click where two features gets selected, I get option of&amp;nbsp;toggle&amp;nbsp;in infowindow but when I toggle between two, then I loose all custom constructed and infowindow just shows title which was configured in WebMap. What can I do retain or am I missing something? whole code is in 'PostCreate' method of widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.map.infoWindow.on("set-features", function () {&lt;BR /&gt; if (this.map.infoWindow.features.length &amp;gt; 0) {&lt;BR /&gt; array.forEach(this.map.infoWindow.features, lang.hitch(this, function (feature) { &lt;BR /&gt; if (feature) { &lt;BR /&gt; var holderdiv = domConstruct.create("div", { "style": "height: 10px;" }, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; var hr = domConstruct.create("hr", null, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; var holderdiv2 = domConstruct.create("div", { "style": "height: 10px;" }, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; var link = domConstruct.create("a", {&lt;BR /&gt; "style": "display: block;",&lt;BR /&gt; "class": "action",&lt;BR /&gt; "id": "relatedLink",&lt;BR /&gt; "innerHTML": "test link", //text that appears in the popup for the link &lt;BR /&gt; "href": "javascript: void(0);"&lt;BR /&gt; }, Dojoquery(".header", this.map.infoWindow.domNode)[0]);&lt;BR /&gt; on(link, "click", function () {&lt;BR /&gt; //some code&lt;BR /&gt; });&lt;BR /&gt; } &lt;BR /&gt; }));&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2019 09:55:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-infowindow-becomes-empty-if-multiple/m-p/456839#M42169</guid>
      <dc:creator>AbhijeetKulkarni</dc:creator>
      <dc:date>2019-11-29T09:55:11Z</dc:date>
    </item>
  </channel>
</rss>

