ra-core
Version: 
Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React
37 lines • 1.56 kB
TypeScript
import * as React from 'react';
import { type FC, type ReactNode } from 'react';
import { type ListControllerResult } from '../controller/list/useListController';
import { type RowClickFunctionBase } from './types';
import { type Identifier, type RaRecord, type SortPayload } from '../types';
export declare const DataTableBase: <RecordType extends RaRecord = any>(props: DataTableBaseProps<RecordType>) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
export interface DataTableBaseProps<RecordType extends RaRecord = any> {
    children: ReactNode;
    expand?: ReactNode | FC<{
        id: Identifier;
        record: RecordType;
        resource: string;
    }>;
    expandSingle?: boolean;
    hiddenColumns?: string[];
    hasBulkActions: boolean;
    hover?: boolean;
    empty: ReactNode;
    isRowExpandable?: (record: RecordType) => boolean;
    isRowSelectable?: (record: RecordType) => boolean;
    loading: ReactNode;
    rowClick?: string | RowClickFunctionBase<RecordType> | false;
    storeKey?: string;
    sort?: SortPayload;
    data?: RecordType[];
    isLoading?: boolean;
    isPending?: boolean;
    onSelect?: ListControllerResult['onSelect'];
    onSelectAll?: ListControllerResult['onSelectAll'];
    onToggleItem?: ListControllerResult['onToggleItem'];
    onUnselectItems?: ListControllerResult['onUnselectItems'];
    resource?: string;
    setSort?: ListControllerResult['setSort'];
    selectedIds?: Identifier[];
    total?: number;
}
//# sourceMappingURL=DataTableBase.d.ts.map