fix: column index calculation error in table block (#5100)
Some checks are pending
auto-merge / push-commit (push) Waiting to run
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
deploy client docs / Build (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase Backend Test / sqlite-test (20, false) (push) Waiting to run
NocoBase Backend Test / sqlite-test (20, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, nocobase, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, nocobase, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, public, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, public, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, nocobase, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, nocobase, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, public, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, public, true) (push) Waiting to run
NocoBase Backend Test / mysql-test (20, false) (push) Waiting to run
NocoBase Backend Test / mysql-test (20, true) (push) Waiting to run
NocoBase Backend Test / mariadb-test (20, false) (push) Waiting to run
NocoBase Backend Test / mariadb-test (20, true) (push) Waiting to run
NocoBase FrontEnd Test / frontend-test (18) (push) Waiting to run
Test on Windows / build (push) Waiting to run

This commit is contained in:
Katherine 2024-08-21 20:16:05 +08:00 committed by GitHub
parent acccd81395
commit fc989fdbc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -624,8 +624,9 @@ export const Table: any = withDynamicSchemaProps(
if (!dragSort && !showIndex) { if (!dragSort && !showIndex) {
return originNode; return originNode;
} }
const current = props?.pagination?.current; const current = paginationProps?.current;
const pageSize = props?.pagination?.pageSize || 20;
const pageSize = paginationProps?.pageSize || 20;
if (current) { if (current) {
index = index + (current - 1) * pageSize + 1; index = index + (current - 1) * pageSize + 1;
} else { } else {
@ -674,6 +675,7 @@ export const Table: any = withDynamicSchemaProps(
getRowKey, getRowKey,
isRowSelect, isRowSelect,
memoizedRowSelection, memoizedRowSelection,
paginationProps,
], ],
); );