diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js index cc97da7aca93..e913e9d56d5f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js @@ -163,5 +163,15 @@ describe( }); cy.get(".table-menu-button-popover li a").should("not.exist"); }); + it("5. should check that menuitems onClick property has access to currentRow", () => { + _.propPane.EnterJSContext("onClick", ""); + _.propPane.TypeTextIntoField("onClick", "{{currentR"); + _.agHelper.AssertElementExist(_.locators._hints); + _.agHelper.GetNAssertElementText( + _.locators._hints, + "currentRow", + "contain.text", + ); + }); }, ); diff --git a/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Basic.ts b/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Basic.ts index 837acc498f4d..f35a3a3da6bc 100644 --- a/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Basic.ts +++ b/app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Basic.ts @@ -251,6 +251,7 @@ export default { isBindProperty: true, isTriggerProperty: true, dependencies: ["primaryColumns", "columnOrder"], + customJSControl: "TABLE_COMPUTE_VALUE", }, ], },