<?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 esri/widgets/Feature renderNow() broken from v4.10 onwards in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-widgets-feature-rendernow-broken-from-v4-10/m-p/476556#M44266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of&amp;nbsp;v4.10 of the API the renderNow() method of the feature widget no longer seems to function correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previously in v4.9 the following code snippet would result in&amp;nbsp;the full html being&amp;nbsp;output to the html variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var div = document.createElement('div'); &lt;BR /&gt;_graphic.attributes = feature.attributes; &lt;BR /&gt;var featureWidget = new Feature({ graphic: _graphic, container: div}); &lt;BR /&gt;featureWidget.renderNow(); &lt;BR /&gt;var html = div.outerHTML;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using v4.10 - 4.12 results in only placeholder divs being output to the html variable, no&amp;nbsp;actual data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example output from v4.9:&lt;/P&gt;&lt;P&gt;&amp;lt;div class="esri-feature"&amp;gt;&amp;lt;div class="esri-feature__size-container"&amp;gt;&amp;lt;div class="esri-feature__main-container"&amp;gt;&amp;lt;div&amp;gt;&amp;lt;font size="2"&amp;gt;ID: 2062683&amp;lt;br&amp;gt;GIS Area (SqM2): 23.08&amp;lt;/font&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example output from v4.12:&lt;/P&gt;&lt;P&gt;&amp;lt;div class="esri-feature esri-widget"&amp;gt;&amp;lt;div class="esri-feature__size-container"&amp;gt;&amp;lt;h4 class="esri-feature__title"&amp;gt;&amp;lt;/h4&amp;gt;&amp;lt;div class="esri-feature__main-container"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I&amp;nbsp;use a&amp;nbsp;$timeout (as in AngularJS app) and re-check div.outerHTML, it does provided the expected result after a brief pause so I imagine there's now some promise&amp;nbsp;at play under the hood of renderNow().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jul 2019 00:05:46 GMT</pubDate>
    <dc:creator>GavinHarriss</dc:creator>
    <dc:date>2019-07-16T00:05:46Z</dc:date>
    <item>
      <title>esri/widgets/Feature renderNow() broken from v4.10 onwards</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-widgets-feature-rendernow-broken-from-v4-10/m-p/476556#M44266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of&amp;nbsp;v4.10 of the API the renderNow() method of the feature widget no longer seems to function correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previously in v4.9 the following code snippet would result in&amp;nbsp;the full html being&amp;nbsp;output to the html variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var div = document.createElement('div'); &lt;BR /&gt;_graphic.attributes = feature.attributes; &lt;BR /&gt;var featureWidget = new Feature({ graphic: _graphic, container: div}); &lt;BR /&gt;featureWidget.renderNow(); &lt;BR /&gt;var html = div.outerHTML;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using v4.10 - 4.12 results in only placeholder divs being output to the html variable, no&amp;nbsp;actual data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example output from v4.9:&lt;/P&gt;&lt;P&gt;&amp;lt;div class="esri-feature"&amp;gt;&amp;lt;div class="esri-feature__size-container"&amp;gt;&amp;lt;div class="esri-feature__main-container"&amp;gt;&amp;lt;div&amp;gt;&amp;lt;font size="2"&amp;gt;ID: 2062683&amp;lt;br&amp;gt;GIS Area (SqM2): 23.08&amp;lt;/font&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example output from v4.12:&lt;/P&gt;&lt;P&gt;&amp;lt;div class="esri-feature esri-widget"&amp;gt;&amp;lt;div class="esri-feature__size-container"&amp;gt;&amp;lt;h4 class="esri-feature__title"&amp;gt;&amp;lt;/h4&amp;gt;&amp;lt;div class="esri-feature__main-container"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I&amp;nbsp;use a&amp;nbsp;$timeout (as in AngularJS app) and re-check div.outerHTML, it does provided the expected result after a brief pause so I imagine there's now some promise&amp;nbsp;at play under the hood of renderNow().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 00:05:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-widgets-feature-rendernow-broken-from-v4-10/m-p/476556#M44266</guid>
      <dc:creator>GavinHarriss</dc:creator>
      <dc:date>2019-07-16T00:05:46Z</dc:date>
    </item>
  </channel>
</rss>

