UNPKG

@start-base/start-ui

Version:

<p align="center"> <a href="https://startbase.dev" target="_blank"> <img src="https://startbase.dev/apple-touch-icon.png" width="60px" style="padding-top: 60px" /> </a> </p>

60 lines (56 loc) 1.54 kB
import React$1, { Key } from 'react'; import { ColumnType } from 'rc-table'; interface DataItem { key?: Key; [key: string]: unknown; } interface DataTableI18N { pagination: { rows: string; of: string; previous: string; next: string; }; filter: { reset: string; columns: string; operator: string; selectOperator: string; typeValue: string; notNeeded: string; contains: string; doesNotContain: string; equals: string; doesNotEqual: string; startsWith: string; endsWith: string; isEmpty: string; isNotEmpty: string; isAnyOf: string; }; } interface DataTableColumn extends ColumnType<DataItem> { filterable?: boolean; } interface DataTableProps { data: DataItem[]; columns: DataTableColumn[]; rowsPerPage?: number; pagination?: boolean; rowsPerPageOptions?: number[]; border?: boolean; rowSelect?: boolean; rowSelectAction?: (selectedRows: (string | number)[]) => void; checkboxAvailable?: boolean; title?: React.ReactNode | string; filter?: boolean; virtualized?: boolean; emptyText?: React.ReactNode; rowClassName?: string; maxHeight?: number; minHeight?: number; sorting?: boolean; i18n?: Partial<DataTableI18N>; } declare const DataTable: React$1.ForwardRefExoticComponent<DataTableProps & React$1.RefAttributes<HTMLDivElement>>; export { type DataTableProps, DataTable as default };