Skip to content

Commit 342c9da

Browse files
table events added for rowShrink and download
1 parent 6bd21e7 commit 342c9da

File tree

5 files changed

+34
-3
lines changed

5 files changed

+34
-3
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,10 @@ export function TableCompView(props: {
745745
setLoading
746746
)
747747
}
748-
onDownload={() => onDownload(`${compName}-data`)}
748+
onDownload={() => {
749+
handleChangeEvent("download");
750+
onDownload(`${compName}-data`)
751+
}}
749752
hasChange={hasChange}
750753
onSaveChanges={() => handleChangeEvent("saveChanges")}
751754
onCancelChanges={() => handleChangeEvent("cancelChanges")}
@@ -778,7 +781,11 @@ export function TableCompView(props: {
778781
: "OB_CHILDREN_KEY_PLACEHOLDER",
779782
fixed: "left",
780783
onExpand: (expanded) => {
781-
if(expanded) handleChangeEvent('rowExpand')
784+
if(expanded) {
785+
handleChangeEvent('rowExpand')
786+
} else {
787+
handleChangeEvent('rowShrink')
788+
}
782789
}
783790
}}
784791
rowColorFn={compChildren.rowColor.getView() as any}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@ export const TableEventOptions = [
7878
value: "rowExpand",
7979
description: trans("table.rowExpand"),
8080
},
81+
{
82+
label: trans("table.rowShrink"),
83+
value: "rowShrink",
84+
description: trans("table.rowShrink"),
85+
},
86+
{
87+
label: trans("table.search"),
88+
value: "search",
89+
description: trans("table.search"),
90+
},
91+
{
92+
label: trans("table.download"),
93+
value: "download",
94+
description: trans("table.download"),
95+
},
8196
{
8297
label: trans("table.filterChange"),
8398
value: "filterChange",

client/packages/lowcoder/src/i18n/locales/de.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,10 @@ export const de = {
11901190
"cancelChanges": "Änderungen abbrechen",
11911191
"rowSelectChange": "Zeile auswählen Ändern",
11921192
"rowClick": "Reihe Klicken",
1193-
"rowExpand": "Reihe Erweitern",
1193+
"rowExpand": "Reihe verkleinern",
1194+
"rowShrink": "Zeilenverkleinerung",
1195+
"search": "Suchen",
1196+
"download": "Herunterladen",
11941197
"filterChange": "Filterwechsel",
11951198
"sortChange": "Sortieren Ändern",
11961199
"pageChange": "Seitenwechsel",

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,9 @@ export const en = {
12961296
"rowSelectChange": "Row Select Change",
12971297
"rowClick": "Row Click",
12981298
"rowExpand": "Row Expand",
1299+
"rowShrink": "Row Shrink",
1300+
"search": "Search",
1301+
"download": "Download",
12991302
"filterChange": "Filter Change",
13001303
"sortChange": "Sort Change",
13011304
"pageChange": "Page Change",

client/packages/lowcoder/src/i18n/locales/zh.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,9 @@ table: {
12671267
rowSelectChange: "行选中变化",
12681268
rowClick: "行点击",
12691269
rowExpand: "行展开",
1270+
rowShrink: "行收缩",
1271+
search: "搜索",
1272+
download: "下载",
12701273
filterChange: "筛选变化",
12711274
sortChange: "排序变化",
12721275
pageChange: "分页变化",

0 commit comments

Comments
 (0)