UNPKG

es-grid-template

Version:

es-grid-template

38 lines (37 loc) 1.59 kB
import type { ColumnDef, ColumnFiltersState, ColumnPinningState, ColumnSizingInfoState, ColumnSizingState, ExpandedState, Table, VisibilityState } from '@tanstack/react-table'; import type { ColumnsTable, Sorter, TableProps } from '../../grid-component/type'; import type { Dispatch, Key, SetStateAction } from 'react'; import React from 'react'; type Props<T> = Omit<TableProps<T>, 'columns'> & { id: string; table: Table<T>; rowKey: string; prefix: string; columns: ColumnDef<T>[]; propsColumns: ColumnsTable<T>; setColumns: Dispatch<SetStateAction<ColumnsTable<T>>>; columnHidden: VisibilityState; expanded: ExpandedState; setExpanded: any; columnPinning: ColumnPinningState; originData: T[]; mergedFilterKeys: any; setMergedFilterKeys: any; isFullScreen: boolean; setIsFullScreen: Dispatch<SetStateAction<boolean>>; triggerFilter: (args: any) => void; triggerSorter: (args: Sorter[]) => void; onContextMenu?: (data: T) => (event: any) => void; triggerChangeColumns?: (args: any, keys: any, type: string) => void; triggerGroupColumns?: (groupedColumns: string[]) => void; windowSize: any; isDataTree: boolean; mergedSelectedKeys: Key[]; setColumnSizing: Dispatch<SetStateAction<any>>; columnSizingInfo: ColumnSizingInfoState; columnSizing: ColumnSizingState; columnFilters: ColumnFiltersState; setColumnOrder?: Dispatch<SetStateAction<string[]>>; }; declare const Grid: <RecordType extends object>(props: Props<RecordType>) => React.JSX.Element; export default Grid;