UNPKG

@table-library/react-table-library

Version:
39 lines (38 loc) 1.32 kB
import * as React from 'react'; import { State, IdReducerFunctions } from '@table-library/react-table-library/types/common'; import { TableNode, GetRowProps } from '@table-library/react-table-library/types/table'; export declare enum SelectClickTypes { RowClick = 0, ButtonClick = 1 } export declare enum SelectTypes { SingleSelect = 0, MultiSelect = 1 } export declare type SelectOptions = { clickType?: SelectClickTypes; rowSelect?: SelectTypes; buttonSelect?: SelectTypes; isCarryForward?: boolean; isPartialToAll?: boolean; }; export declare type SelectOptionsSound = Required<SelectOptions>; export declare type CellSelectProps<T extends TableNode> = { item: T; }; declare type ColumnSelectPropsObject = { renderHeaderCellSelect?: () => React.ReactNode; renderCellSelect?: (node: TableNode) => React.ReactNode; }; export declare type ColumnSelectProps = ColumnSelectPropsObject | boolean; export declare type Select<T extends TableNode> = { state: State; fns: IdReducerFunctions<T>; options: SelectOptionsSound; _getRowProps: GetRowProps<T>; components: { HeaderCellSelect: React.FunctionComponent<Record<string, any>>; CellSelect: React.FunctionComponent<CellSelectProps<T>>; }; }; export {};