MCPcopy Create free account
hub / github.com/Tencent/CodeAnalysis / onChange

Function onChange

web/packages/shared/component/table/index.tsx:18–24  ·  view source on GitHub ↗
(page: number, pageSize?: number)

Source from the content-addressed store, hash-verified

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} 条`,

Callers

nothing calls this directly

Calls 2

getURLPathByFilterParamsFunction · 0.90
getPaginationParamsFunction · 0.90

Tested by

no test coverage detected