<?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>idea Add in row click events to Feature Table widget in ArcGIS JavaScript Maps SDK Ideas</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idi-p/1194482</link>
    <description>&lt;P&gt;I have worked with the Feature Table widget for a couple of projects and it would be great if there were some additional &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#events-summary" target="_self"&gt;events for the Feature Table Widget&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I would love to just see a row click event that would work much like the selection, but it would just return the feature on that row. Typically I am looking for a function to allow the user to click a row and zoom to the feature instead of requiring the user to select a row.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 15:59:06 GMT</pubDate>
    <dc:creator>wjenkins</dc:creator>
    <dc:date>2022-07-21T15:59:06Z</dc:date>
    <item>
      <title>Add in row click events to Feature Table widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idi-p/1194482</link>
      <description>&lt;P&gt;I have worked with the Feature Table widget for a couple of projects and it would be great if there were some additional &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#events-summary" target="_self"&gt;events for the Feature Table Widget&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I would love to just see a row click event that would work much like the selection, but it would just return the feature on that row. Typically I am looking for a function to allow the user to click a row and zoom to the feature instead of requiring the user to select a row.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 15:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idi-p/1194482</guid>
      <dc:creator>wjenkins</dc:creator>
      <dc:date>2022-07-21T15:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add in row click events to Feature Table widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idc-p/1197197#M156</link>
      <description>&lt;P&gt;I do agree that being able to click on the row itself would be make the FeatureTable easier to use, also the selection row can take up space if you have a narrow container.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been able to achieve this, but its not something supported or documented with the API.&amp;nbsp; The FeatureTable is built off the &lt;A href="https://vaadin.com/docs/latest/components/grid" target="_self"&gt;Vaadin grid component&lt;/A&gt;, so the trick was to access the &lt;STRONG&gt;vaadin-grid&lt;/STRONG&gt; element in the feature table container, then you can listen for the &lt;STRONG&gt;cell-activate&lt;/STRONG&gt; event on the grid. I have to add a short timeout, since its not always available when the feature table is ready.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can tell if the row is selected from the &lt;STRONG&gt;detail.model.selected&lt;/STRONG&gt; attribute of the event and get the feature from the &lt;STRONG&gt;detail.model.item.feature&lt;/STRONG&gt;.&amp;nbsp; Here I am just selecting or deselecting the row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;          featureTable.when(() =&amp;gt; {
            setTimeout(() =&amp;gt; {
              const grid = featureTable.container.querySelector("vaadin-grid");
              grid?.addEventListener("cell-activate", (e) =&amp;gt; {
                const selected = e.detail.model.selected;
                const feature = e.detail.model.item.feature;
                selected ? featureTable.deselectRows(feature) : featureTable.selectRows(feature);
               });
            },100);
          });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 00:54:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idc-p/1197197#M156</guid>
      <dc:creator>Justin_Greco</dc:creator>
      <dc:date>2022-07-29T00:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add in row click events to Feature Table widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idc-p/1368988#M306</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/233731"&gt;@Justin_Greco&lt;/a&gt;&amp;nbsp;Thank you so much Justin. Your solution makes my life easy.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 16:30:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idc-p/1368988#M306</guid>
      <dc:creator>NaveedAhmed2</dc:creator>
      <dc:date>2024-01-11T16:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add in row click events to Feature Table widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idc-p/1592748#M384</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/146381"&gt;@NaveedAhmed2&lt;/a&gt;&amp;nbsp;I just noticed at 4.30 they added some cell events, including cell-click.&amp;nbsp; I'd recommend changing to this if possible, my suggestion was a bit of a hack.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;            &amp;lt;arcgis-feature-table
              onarcgisCellClick={featureTableCellClick}
            &amp;gt;&amp;lt;/arcgis-feature-table&amp;gt;&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;  const featureTableCellClick = (event) =&amp;gt; {
    if (event.detail.feature) {
      event.currentTarget.highlightIds = new Collection([event.detail.feature.getObjectId()]);
    }
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 14:54:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-in-row-click-events-to-feature-table-widget/idc-p/1592748#M384</guid>
      <dc:creator>Justin_Greco</dc:creator>
      <dc:date>2025-03-06T14:54:25Z</dc:date>
    </item>
  </channel>
</rss>

