fix: column index calculation error in table block (#5100)

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) {
return originNode;
}
const current = props?.pagination?.current;
const pageSize = props?.pagination?.pageSize || 20;
const current = paginationProps?.current;
const pageSize = paginationProps?.pageSize || 20;
if (current) {
index = index + (current - 1) * pageSize + 1;
} else {
@ -674,6 +675,7 @@ export const Table: any = withDynamicSchemaProps(
getRowKey,
isRowSelect,
memoizedRowSelection,
paginationProps,
],
);