import { ReactNode } from 'react'; import { Field, SortType } from '../types'; import { RowProps } from './types'; /** * Displays provided list of entities as table. Supported features: * 1) sorting via arrow buttons in the header * 2) stable row keys based on entity[uidFieldId] * 3) (if present) display nodes passed via children prop instead of entities (extension point to handle empty state end related corner cases) * * @see useSort */ export declare function TableView({ uidFieldId, visibleColumns, entities, 'aria-label': ariaLabel, Row, children, activeSort, setActiveSort, currentNamespace, }: TableViewProps): JSX.Element; interface TableViewProps { visibleColumns: Field[]; entities: T[]; 'aria-label': string; /** * entity[uidFieldId] is used to uniquely identify a row. Defaults to UID column. */ uidFieldId?: string; /** * Maps entities to table rows. */ Row(props: RowProps): JSX.Element; /** * Nodes to be displayed instead of the entities. * Extension point to handle empty state and related cases. */ children?: ReactNode[]; activeSort: SortType; setActiveSort: (sort: SortType) => void; currentNamespace: string; } export {};