import { ReactElement } from 'react'; import '../../Components/DataTable/DataTable.css'; declare type ColumnDef = { name: string; displayName: string; help?: string; sortType?: string; isDisplayable?: boolean; isSortable?: boolean; }; declare type Row = { [key: string]: any; }; declare type SortingDef = { name: string; direction: 'ASC' | 'DESC'; }; declare type ChildRowProps = { rowIndex: number; rowData: Object; }; declare type Props = { /** * Array of descriptors used for table column headers. * `name` is used as a key for looking up cell data in `data`. * `displayName` is an optional property used for the header text (`name` is * used as a fallback). */ columns: ColumnDef[]; /** * The data to display in the table. An array of objects whose keys correspond * to the `name` property in the `columns` prop. */ data: Row[]; /** * Default sorting for the table. Each item indicates the column and direction. */ sorting?: SortingDef[]; onSortingChange?: (sorting: SortingDef[]) => void; /** width of the table - if a string, treated as a CSS unit; if a number, treated as px */ width?: string | number; /** height of the table - if a string, treated as a CSS unit; if a number, treated as px */ height?: string | number; /** can users search the table */ searchable?: boolean; /** * Determines the body of child rows. If this is provided, each table row will * be rendered with an expansion toggle. This can be a string, a function, or * a React Component. If it is a function, the function will receive the same * props argument that the React Component would receive as props: * * props: { * rowIndex: number; * rowData: Object; * } */ childRow?: string | ((props: ChildRowProps) => ReactElement); /** Array of row ids that should be expanded */ expandedRows?: number[]; /** Called when expanded rows change */ onExpandedRowsChange?: (indexes: number[]) => void; getRowId: (row: Row) => number; /** Called when the underlying DataTable has been drawn */ onDraw: (table: HTMLTableElement) => void; /** * If this prop is not provided, the search term * will be maintained "internally" by this component. */ searchTerm?: string; /** Called when the search term has changed */ onSearchTermChange?: (newSearchTerm: string) => void; }; declare const _default: import("../../Utils/ComponentUtils").ComponentWrapper; export default _default; //# sourceMappingURL=DataTable.d.ts.map