Skip to content

Commit 7d803ff

Browse files
committed
fix(ui5-table): stops the propagation of overflow button
Fixes: #11159
1 parent d338528 commit 7d803ff

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/main/cypress/specs/TableRowActions.cy.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ describe("TableRowActions", () => {
9191
</>
9292
);
9393

94+
cy.get("@table").then($table => {
95+
$table[0].addEventListener("row-click", cy.stub().as("rowClick"));
96+
});
97+
9498
cy.get("@headerRow").shadow().find("#actions-cell").should("exist");
9599
cy.get("@innerTable").should("have.css", "gridTemplateColumns", `${8 + 36 + 4 + 36 + 8}px`);
96100
cy.get("@row1").shadow().find("#actions-cell").children().as("actions");
@@ -157,6 +161,8 @@ describe("TableRowActions", () => {
157161
cy.get("@innerTable").should("have.css", "gridTemplateColumns", `${8 + 36 + 8}px`);
158162
cy.get("@actions").should("have.length", 1);
159163
cy.get("@actions").eq(0).should("have.attr", "icon", "overflow");
164+
165+
cy.get("@rowClick").should("have.callCount", 0);
160166
});
161167

162168
it("tests that invisible actions occupy space for alignment", () => {

packages/main/src/TableRow.ts

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ class TableRow extends TableRowBase {
156156
_onOverflowButtonClick(e: MouseEvent) {
157157
const ctor = this.actions[0].constructor as typeof TableRowActionBase;
158158
ctor.showMenu(this._overflowActions, e.target as HTMLElement);
159+
e.stopPropagation();
159160
}
160161

161162
get _isInteractive() {

0 commit comments

Comments
 (0)