<?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 popupTemplate in 4.17 and 4.18 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popuptemplate-in-4-17-and-4-18/m-p/1045683#M72448</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have created an app with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(function() {
  view.popup.watch("selectedFeature", function(selectedFeature) {
    if(selectedFeature) {
      selectedFeature.popupTemplate = {
        title: "custom title",
        content: "custom content"
      };
      console.log(selectedFeature.popupTemplate.title);
      console.log(selectedFeature.popupTemplate.content);
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine in ArcGIS JS API 4.16. When feature is selected, then popup is open with &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;required&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; title and content.&lt;/P&gt;&lt;P&gt;In 4.17 and also 4.18 it is problem. popupTemplate is set &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;correctly, but popup is open with default content like this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 001.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10555iC29C86D44C081295/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Image 001.png" alt="Image 001.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Where is the issue with this concept in new versions ArcGIS JS API?&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Kamil&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Apr 2021 12:44:04 GMT</pubDate>
    <dc:creator>KamilNovák</dc:creator>
    <dc:date>2021-04-10T12:44:04Z</dc:date>
    <item>
      <title>popupTemplate in 4.17 and 4.18</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popuptemplate-in-4-17-and-4-18/m-p/1045683#M72448</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have created an app with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(function() {
  view.popup.watch("selectedFeature", function(selectedFeature) {
    if(selectedFeature) {
      selectedFeature.popupTemplate = {
        title: "custom title",
        content: "custom content"
      };
      console.log(selectedFeature.popupTemplate.title);
      console.log(selectedFeature.popupTemplate.content);
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine in ArcGIS JS API 4.16. When feature is selected, then popup is open with &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;required&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; title and content.&lt;/P&gt;&lt;P&gt;In 4.17 and also 4.18 it is problem. popupTemplate is set &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;correctly, but popup is open with default content like this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 001.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10555iC29C86D44C081295/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Image 001.png" alt="Image 001.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Where is the issue with this concept in new versions ArcGIS JS API?&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Kamil&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 12:44:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popuptemplate-in-4-17-and-4-18/m-p/1045683#M72448</guid>
      <dc:creator>KamilNovák</dc:creator>
      <dc:date>2021-04-10T12:44:04Z</dc:date>
    </item>
  </channel>
</rss>

