@devfamily/admiral
Version:
Admiral is a frontend framework for creating back office using React. It provides out-of-the-box components and tools that make developing an admin interface easy and fast.
10 lines (9 loc) • 517 B
TypeScript
import { TablePaginationConfig } from '../interfaces';
export declare const DEFAULT_PAGE_SIZE = 10;
export declare type PaginationParam = {
current: number;
pageSize: number;
total: number;
};
export declare function getPaginationParam(mergedPagination: TablePaginationConfig): Partial<PaginationParam>;
export default function usePagination(total: number, pagination: TablePaginationConfig | false | undefined, onChange: (current: number, pageSize: number) => void): [TablePaginationConfig, () => void];