Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101441878
usePagination.d.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 10, 12:42
Size
1 KB
Mime Type
text/x-java
Expires
Wed, Feb 12, 12:42 (1 d, 12 h)
Engine
blob
Format
Raw Data
Handle
24163345
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
usePagination.d.ts
View Options
import * as React from 'react';
export interface UsePaginationProps {
/**
* Number of always visible pages at the beginning and end.
* @default 1
*/
boundaryCount?: number;
/**
* The name of the component where this hook is used.
*/
componentName?: string;
/**
* The total number of pages.
* @default 1
*/
count?: number;
/**
* The page selected by default when the component is uncontrolled.
* @default 1
*/
defaultPage?: number;
/**
* If `true`, the component is disabled.
* @default false
*/
disabled?: boolean;
/**
* If `true`, hide the next-page button.
* @default false
*/
hideNextButton?: boolean;
/**
* If `true`, hide the previous-page button.
* @default false
*/
hidePrevButton?: boolean;
/**
* Callback fired when the page is changed.
*
* @param {React.ChangeEvent<unknown>} event The event source of the callback.
* @param {number} page The page selected.
*/
onChange?: (event: React.ChangeEvent<unknown>, page: number) => void;
/**
* The current page.
*/
page?: number;
/**
* If `true`, show the first-page button.
* @default false
*/
showFirstButton?: boolean;
/**
* If `true`, show the last-page button.
* @default false
*/
showLastButton?: boolean;
/**
* Number of always visible pages before and after the current page.
* @default 1
*/
siblingCount?: number;
}
export interface UsePaginationItem {
onClick: React.ReactEventHandler;
type: 'page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis';
page: number | null;
selected: boolean;
disabled: boolean;
}
export interface UsePaginationResult {
items: UsePaginationItem[];
}
export default function usePagination(props: UsePaginationProps): UsePaginationResult;
Event Timeline
Log In to Comment