(page: number, pageSize?: number)
| 16 | const { pagination, filterFields = [], ...otherProps } = props; |
| 17 | const history = useHistory(); |
| 18 | const onChange = (page: number, pageSize?: number) => { |
| 19 | if (!pageSize) { |
| 20 | throw new Error('pageSize is undefined'); |
| 21 | } |
| 22 | const url = getURLPathByFilterParams(filterFields, getPaginationParams(page, pageSize)); |
| 23 | history.push(url); |
| 24 | }; |
| 25 | return ( |
| 26 | <Table className={s.routeTable} scroll={{ x: true }} pagination={{ |
| 27 | showTotal: (total: any, range: any) => `${range[0]} - ${range[1]} 条数据,共 ${total} 条`, |
nothing calls this directly
no test coverage detected