From baadf6b0a824c3259f9f65a281dc533a7f735d42 Mon Sep 17 00:00:00 2001 From: Sai Charan Chetpelly Date: Fri, 27 Sep 2024 10:43:53 +0530 Subject: [PATCH] fix: tablewidget menubutton --- .../TableV2/columnTypes/ColumnTypeMenubutton_spec.js | 10 ++++++++++ .../widget/propertyConfig/PanelConfig/Basic.ts | 1 + 2 files changed, 11 insertions(+) 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 cc97da7aca9..e913e9d56d5 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 837acc498f4..f35a3a3da6b 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", }, ], },