import { Component } from 'react'; export interface IPaginationBaseJumperProps { current?: number; onJump: (page: number) => void; } export interface IPaginationBaseJumperState { value: number | null; } export abstract class BasePageJumper< P extends IPaginationBaseJumperProps, S extends IPaginationBaseJumperState > extends Component
{
abstract handleJump(pageNumber: number): void;
constructor(props: P) {
super(props);
this.state = {
value: props.current ?? null,
} as S;
}
onChange = (value: number | null) => {
this.setState({
value,
});
};
onConfirm: React.KeyboardEventHandler