import * as React from 'react'; import { ElementOf, Omit, tuple } from '../_util/type'; import { TransferItem } from '.'; import { TransferListProps, RenderedItem } from './list'; import ListItem from './ListItem'; export const OmitProps = tuple('handleFilter', 'handleClear', 'checkedKeys'); export type OmitProp = ElementOf; type PartialTransferListProps = Omit; export interface TransferListBodyProps extends PartialTransferListProps { filteredItems: TransferItem[]; filteredRenderItems: RenderedItem[]; selectedKeys: string[]; } class ListBody extends React.Component { onItemSelect = (item: TransferItem) => { const { onItemSelect, selectedKeys } = this.props; const checked = selectedKeys.indexOf(item.key) >= 0; onItemSelect(item.key, !checked); }; render() { const { prefixCls, onScroll, filteredRenderItems, selectedKeys, disabled: globalDisabled, } = this.props; return (
    {filteredRenderItems.map(({ renderedEl, renderedText, item }: RenderedItem) => { const { disabled } = item; const checked = selectedKeys.indexOf(item.key) >= 0; return ( ); })}
); } } const ListBodyWrapper = (props: TransferListBodyProps) => ; export default ListBodyWrapper;