fix: table select pagination error (#4078)

This commit is contained in:
katherinehhh 2024-04-18 11:30:38 +08:00 committed by GitHub
parent a88b32bc7a
commit a3795c2ec3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -309,13 +309,7 @@ export const useTableSelectorProps = () => {
showIndex: false,
dragSort: false,
rowKey: ctx.rowKey || 'id',
pagination:
ctx?.params?.paginate !== false
? {
defaultCurrent: ctx?.params?.page || 1,
defaultPageSize: ctx?.params?.pageSize,
}
: false,
pagination: fieldSchema?.['x-component-props']?.pagination === false ? false : field.componentProps.pagination,
onRowSelectionChange(selectedRowKeys, selectedRows) {
ctx.field.data = ctx?.field?.data || {};
ctx.field.data.selectedRowKeys = selectedRowKeys;