mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
remove onChange functions in Table.onChange(pagination)
This commit is contained in:
parent
b34557ef17
commit
6e4fae0e29
@ -731,9 +731,12 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
|
||||
/> : null;
|
||||
}
|
||||
|
||||
// Get pagination, filters, sorter
|
||||
prepareParamsArguments(state: any): [any, string[], Object] {
|
||||
// 准备筛选、排序、分页的参数
|
||||
const pagination = state.pagination;
|
||||
const pagination = { ...state.pagination };
|
||||
// remove useless handle function in Table.onChange
|
||||
delete pagination.onChange;
|
||||
delete pagination.onShowSizeChange;
|
||||
const filters = state.filters;
|
||||
const sorter: any = {};
|
||||
if (state.sortColumn && state.sortOrder) {
|
||||
|
@ -68,8 +68,6 @@ describe('Table.pagination', () => {
|
||||
expect(handleChange).toBeCalledWith(
|
||||
{
|
||||
current: 2,
|
||||
onChange: handlePaginationChange,
|
||||
onShowSizeChange: noop,
|
||||
pageSize: 2,
|
||||
},
|
||||
{},
|
||||
|
Loading…
Reference in New Issue
Block a user