Skip to content

Commit f0fca07

Browse files
Merge pull request #2033 from iamfaran/feat/2010-pagesize-event
[Feat]: #2010 add pagesize event
2 parents 430cab9 + f205a1b commit f0fca07

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,9 @@ export const TableToolbar = memo(function TableToolbar(props: {
871871
if (page !== pagination.current) {
872872
onEvent("pageChange");
873873
}
874+
if (pageSize !== pagination.pageSize) {
875+
onEvent("pageSizeChange");
876+
}
874877
}}
875878
/>
876879
{hasChange && toolbar.showUpdateButtons && (

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ export const TableEventOptions = [
139139
value: "pageChange",
140140
description: trans("table.pageChange"),
141141
},
142+
{
143+
label: trans("table.pageSizeChange"),
144+
value: "pageSizeChange",
145+
description: trans("table.pageSizeChange"),
146+
},
142147
{
143148
label: trans("table.refresh"),
144149
value: "refresh",

client/packages/lowcoder/src/comps/comps/tableLiteComp/tableToolbarComp.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ export const TableToolbar = memo(function TableToolbar(props: {
204204
if (page !== pagination.current) {
205205
onEvent("pageChange");
206206
}
207+
if (pageSize !== pagination.pageSize) {
208+
onEvent("pageSizeChange");
209+
}
207210
}}
208211
/>
209212
</ToolbarRow>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ export const TableEventOptions = [
9898
value: "pageChange",
9999
description: trans("table.pageChange"),
100100
},
101+
{
102+
label: trans("table.pageSizeChange"),
103+
value: "pageSizeChange",
104+
description: trans("table.pageSizeChange"),
105+
},
101106
{
102107
label: trans("table.refresh"),
103108
value: "refresh",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,7 @@ export const en = {
21462146
"filterChange": "Filter Change",
21472147
"sortChange": "Sort Change",
21482148
"pageChange": "Page Change",
2149+
"pageSizeChange": "Page Size Change",
21492150
"refresh": "Refresh",
21502151
"rowColor": "Conditional row color",
21512152
"rowColorDesc": "Conditionally Set the Row Color Based on the Optional Variables: CurrentRow, CurrentOriginalIndex, CurrentIndex, ColumnTitle. For Example: '{{ currentRow.id > 3 ? \"green\" : \"red\" }}'",

0 commit comments

Comments
 (0)