UNPKG

1.3 kBTypeScriptView Raw
1import * as React from 'react';
2import { ElementOf, Omit } from '../_util/type';
3import { TransferListProps, RenderedItem } from './list';
4import { KeyWiseTransferItem } from '.';
5export declare const OmitProps: ["handleFilter", "handleClear", "checkedKeys"];
6export declare type OmitProp = ElementOf<typeof OmitProps>;
7declare type PartialTransferListProps<RecordType> = Omit<TransferListProps<RecordType>, OmitProp>;
8export interface TransferListBodyProps<RecordType> extends PartialTransferListProps<RecordType> {
9 filteredItems: RecordType[];
10 filteredRenderItems: RenderedItem<RecordType>[];
11 selectedKeys: string[];
12}
13interface TransferListBodyState {
14 current: number;
15}
16declare class ListBody<RecordType extends KeyWiseTransferItem> extends React.Component<TransferListBodyProps<RecordType>, TransferListBodyState> {
17 state: {
18 current: number;
19 };
20 static getDerivedStateFromProps<T>({ filteredRenderItems, pagination }: TransferListBodyProps<T>, { current }: TransferListBodyState): {
21 current: number;
22 } | null;
23 onItemSelect: (item: RecordType) => void;
24 onItemRemove: (item: RecordType) => void;
25 onPageChange: (current: number) => void;
26 getItems: () => RenderedItem<RecordType>[];
27 render(): JSX.Element;
28}
29export default ListBody;