import * as React from 'react'; import { ITableContainerProps, ITableRowProps } from '../table'; import { IDataTableRowProps } from './data-table-row'; import { DataTableSortDirectionType, IDataTableColumn, UnionOrString } from './data-table-types'; export interface IDataTableProps extends ITableContainerProps, Pick, 'onRowClick' | 'renderItemDetails'> { /** The items in the table. */ items: ItemType[]; /** Set to 'fixed' to prevent columns from expanding beyond their defined width. */ tableLayout?: 'auto' | 'fixed'; /** Hide the table header row. */ hideHeader?: boolean; /** Hover state for rows. */ hover?: boolean; /** column information */ columns: Array | null | undefined | false>; /** Items are sorted on this field (defaults to the first sortable column) */ sortOn?: UnionOrString; /** Direction of sort * @default asc */ sortDirection?: DataTableSortDirectionType; /** A message to show to the user in case items is empty * @default There are no items to display */ emptyMessage?: React.ReactNode; /** Visually hidden accessible label for the row-details column header. * @default Details */ itemDetailsHeaderLabel?: string; /** Used to display a loading state in the table */ isLoading?: boolean; /** A function that will be called when the table is re-sorted via clicking a header. */ onSort?(field: UnionOrString, direction: DataTableSortDirectionType): void; /** * Used to extract a unique key for a given item at the specified index. * By default the index is used. */ keyExtractor?(item: ItemType, index: number): string | number; /** * Used to override default row component with custom behavior (drag/drop) */ rowRenderer?(item: ItemType, index: number): React.ElementType; /** * Used to customize row props (style, className, etc.) per item. */ getRowProps?(item: ItemType, index: number): ITableRowProps; } declare const DataTableImpl: (props: IDataTableProps, ref: React.Ref) => React.JSX.Element; export declare const DataTable: typeof DataTableImpl; export {};