Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 70eddf1

Browse files
Added double click to the table event hanlders
1 parent aa8d8f9 commit 70eddf1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

‎client/packages/lowcoder/src/comps/comps/tableComp/selectionControl.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export const SelectionControl = (function () {
7474
onEvent("rowSelectChange");
7575
}
7676
},
77+
onDoubleClick: () => {
78+
onEvent("doubleClick");
79+
if (getKey(record) !== props.selectedRowKey) {
80+
onEvent("rowSelectChange");
81+
}
82+
}
7783
};
7884
},
7985
};
@@ -101,6 +107,10 @@ export const SelectionControl = (function () {
101107
changeSelectedRowKey(record);
102108
onEvent("rowClick");
103109
},
110+
onDoubleClick: () => {
111+
changeSelectedRowKey(record);
112+
onEvent("doubleClick");
113+
}
104114
};
105115
},
106116
};

‎client/packages/lowcoder/src/comps/comps/tableComp/tableTypes.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ export const TableEventOptions = [
144144
value: "refresh",
145145
description: trans("table.refresh"),
146146
},
147+
{
148+
label: trans("event.doubleClick"),
149+
value: "doubleClick",
150+
description: trans("event.doubleClickDesc"),
151+
}
147152
] as const;
148153

149154
export type TableEventOptionValues = typeof TableEventOptions[number]['value'];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /