es-grid-template
Version:
es-grid-template
29 lines (28 loc) • 1.06 kB
TypeScript
import type { Dispatch, SetStateAction } from "react";
import type { ColumnsTable, ColumnTable, IFormat, SelectionSettings } from '../../grid-component/type';
import type { Cell, ColumnDef } from '@tanstack/react-table';
export declare const renderValueCell: <T>(column: ColumnTable<T>, value: any, record: T, rowIndex: number, colIndex: number, format?: IFormat, editAble?: boolean) => any;
export declare function convertToTanStackColumns<T>({ t, columns, format, editAble }: {
t?: any;
columns: ColumnsTable<T>;
format?: IFormat;
editAble?: boolean;
}): ColumnDef<T, any>[];
export type ToggleRow<T> = {
e: any;
cell: Cell<T, unknown>;
selectionSettings?: SelectionSettings;
isSelectionChange?: {
isChange: boolean;
type: string;
rowData: T;
rowsData: T[];
};
setIsSelectionChange: Dispatch<SetStateAction<{
isChange: boolean;
type: string;
rowData: T;
rowsData: T[];
}>>;
};
export declare const toggleRowSelection: <T>(props: ToggleRow<T>) => void;