<?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 Add custom menu item to FeatureTable menu in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1167173#M77114</link>
    <description>&lt;P&gt;I can create the menu item but am stumped how I add the menu item to the FeatureTable's menu.&amp;nbsp; Any suggestions would be great.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 19:23:48 GMT</pubDate>
    <dc:creator>SeanRedar</dc:creator>
    <dc:date>2022-04-22T19:23:48Z</dc:date>
    <item>
      <title>Add custom menu item to FeatureTable menu</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1167173#M77114</link>
      <description>&lt;P&gt;I can create the menu item but am stumped how I add the menu item to the FeatureTable's menu.&amp;nbsp; Any suggestions would be great.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 19:23:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1167173#M77114</guid>
      <dc:creator>SeanRedar</dc:creator>
      <dc:date>2022-04-22T19:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom menu item to FeatureTable menu</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1167258#M77116</link>
      <description>&lt;P&gt;This has worked for me on JS API 4.23:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const table = new FeatureTable({
    layer: myLayer,
    fieldConfigs: myFields,
    attachmentsEnabled: false,
    visibleElements: {
        selectionColumn: true,
        header: true,
        menu: true
    }
});

table.when().then(() =&amp;gt; {
    const newMenuItem = {
        label: "Do something",
        clickFunction: (event) =&amp;gt; {
            console.log("Clicked!");
        }
    };
    table.menu.items.push(newMenuItem);
});&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Apr 2022 22:40:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1167258#M77116</guid>
      <dc:creator>AlejandroMari1</dc:creator>
      <dc:date>2022-04-22T22:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom menu item to FeatureTable menu</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1167571#M77124</link>
      <description>&lt;P&gt;Yes, thank you.&amp;nbsp; I think I was passing the wrong object to the menu.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 15:59:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1167571#M77124</guid>
      <dc:creator>SeanRedar</dc:creator>
      <dc:date>2022-04-25T15:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom menu item to FeatureTable menu</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1174855#M77355</link>
      <description>&lt;P&gt;Update - it worked inconsistently but doesn't seem to be working at all now.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 22:16:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1174855#M77355</guid>
      <dc:creator>SeanRedar</dc:creator>
      <dc:date>2022-05-17T22:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom menu item to FeatureTable menu</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1221642#M79007</link>
      <description>&lt;P&gt;&lt;SPAN&gt;add visible property on object newMenuItem&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;                    table.when().then(() =&amp;gt; {
                        const newMenuItem = {
                            label: "Do something",
                            iconClass: "Icon font name, if applicable",
                            visible: true,
                            clickFunction: (event) =&amp;gt; {
                                console.log("Clicked!");
                            }
                        };
                        table.menu.items.push(newMenuItem);
                    });&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Oct 2022 16:40:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1221642#M79007</guid>
      <dc:creator>KevinUseche</dc:creator>
      <dc:date>2022-10-13T16:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom menu item to FeatureTable menu</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1281764#M80940</link>
      <description>&lt;P&gt;The menu property is marked as readonly and should not be edited. You can use the property menuConfig instead. Here is an example which shows standard entries and a custom menu item in the Feature Tables's menu&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;featureTable.when().then(() =&amp;gt; {
            const buttonMenuItem1 = new ButtonMenuItem ({
                    label: "custom menu item label",
                    clickFunction: function () {
                        console.log("click MenuItem1");
                    }
                });
                const buttonMenu = new ButtonMenu ({
                    iconClass: "esri-icon-handle-horizontal",
                    items: []
                });
                featureTable.menu.items.forEach(element =&amp;gt; {
                    buttonMenu.items.push(element);
                });
                buttonMenu.items.push(buttonMenuItem1);
                featureTable.menuConfig = buttonMenu;
        });&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 24 Apr 2023 10:21:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-menu-item-to-featuretable-menu/m-p/1281764#M80940</guid>
      <dc:creator>ChristineWiltawsky1</dc:creator>
      <dc:date>2023-04-24T10:21:32Z</dc:date>
    </item>
  </channel>
</rss>

