Skip to content

Table enhancements and events #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
table events added for rowShrink and download
  • Loading branch information
raheeliftikhar5 committed Jan 12, 2024
commit 342c9daeef520c6637110fe319ec0921a450cbcc
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,10 @@ export function TableCompView(props: {
setLoading
)
}
onDownload={() => onDownload(`${compName}-data`)}
onDownload={() => {
handleChangeEvent("download");
onDownload(`${compName}-data`)
}}
hasChange={hasChange}
onSaveChanges={() => handleChangeEvent("saveChanges")}
onCancelChanges={() => handleChangeEvent("cancelChanges")}
Expand Down Expand Up @@ -778,7 +781,11 @@ export function TableCompView(props: {
: "OB_CHILDREN_KEY_PLACEHOLDER",
fixed: "left",
onExpand: (expanded) => {
if(expanded) handleChangeEvent('rowExpand')
if(expanded) {
handleChangeEvent('rowExpand')
} else {
handleChangeEvent('rowShrink')
}
}
}}
rowColorFn={compChildren.rowColor.getView() as any}
Expand Down
15 changes: 15 additions & 0 deletions client/packages/lowcoder/src/comps/comps/tableComp/tableTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ export const TableEventOptions = [
value: "rowExpand",
description: trans("table.rowExpand"),
},
{
label: trans("table.rowShrink"),
value: "rowShrink",
description: trans("table.rowShrink"),
},
{
label: trans("table.search"),
value: "search",
description: trans("table.search"),
},
{
label: trans("table.download"),
value: "download",
description: trans("table.download"),
},
{
label: trans("table.filterChange"),
value: "filterChange",
Expand Down
5 changes: 4 additions & 1 deletion client/packages/lowcoder/src/i18n/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,10 @@ export const de = {
"cancelChanges": "Änderungen abbrechen",
"rowSelectChange": "Zeile auswählen Ändern",
"rowClick": "Reihe Klicken",
"rowExpand": "Reihe Erweitern",
"rowExpand": "Reihe verkleinern",
"rowShrink": "Zeilenverkleinerung",
"search": "Suchen",
"download": "Herunterladen",
"filterChange": "Filterwechsel",
"sortChange": "Sortieren Ändern",
"pageChange": "Seitenwechsel",
Expand Down
3 changes: 3 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,9 @@ export const en = {
"rowSelectChange": "Row Select Change",
"rowClick": "Row Click",
"rowExpand": "Row Expand",
"rowShrink": "Row Shrink",
"search": "Search",
"download": "Download",
"filterChange": "Filter Change",
"sortChange": "Sort Change",
"pageChange": "Page Change",
Expand Down
3 changes: 3 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,9 @@ table: {
rowSelectChange: "行选中变化",
rowClick: "行点击",
rowExpand: "行展开",
rowShrink: "行收缩",
search: "搜索",
download: "下载",
filterChange: "筛选变化",
sortChange: "排序变化",
pageChange: "分页变化",
Expand Down