import React from 'react'; import { ListGroupProps } from 'reactstrap'; import { FilterHeaderProps } from './components/FilterHeader'; import { SortHeaderProps } from './components/SortHeader'; import { ListItemProps } from './ListItem'; interface Sort { property?: string | string[]; ascending?: boolean; } interface Item { expanded?: boolean; key?: string; [key: string]: any; } export interface ListProps extends Omit { children?: ListItemProps['children']; filter?: string; filterPlaceholder?: string; header?: React.ReactNode; height?: string | number; scrollPositionKey?: string; onExpand?: ListItemProps['onExpand']; onFilter?: FilterHeaderProps['onChange']; itemClassName?: string; items?: T[]; select?: 'checkbox' | 'switch' | 'radio' | ''; selected?: T[]; onSelect?: (items: T[]) => void; onSort?: ({ property, ascending }: Sort) => void; selectedKeyMapper?: (item: T) => any; sort?: Sort; sortByLabel?: SortHeaderProps['sortByLabel']; sortOptions?: SortHeaderProps['sortOptions']; selectable?: (item: T) => boolean; } declare function List({ children: render, filter, filterPlaceholder, flush, header, height, scrollPositionKey, itemClassName, items, onExpand, onFilter, onSelect, onSort, select, selected, selectedKeyMapper, sort, sortByLabel, sortOptions, selectable, ...props }: ListProps): JSX.Element; declare namespace List { var defaultProps: { children: () => null; filterPlaceholder: string; items: never[]; onSelect: () => void; select: "" | "switch" | "checkbox" | "radio" | undefined; selected: never[]; selectedKeyMapper: (x: any) => any; sort: {}; sortByLabel: string; selectable: () => boolean; }; } export default List;