From a60f19ff08e5fb520d490ac57b140407ac7404b3 Mon Sep 17 00:00:00 2001 From: honzapatCZ Date: Tue, 14 Jan 2025 19:20:43 +0100 Subject: [PATCH] add up types --- Table/NejReactTable.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Table/NejReactTable.tsx b/Table/NejReactTable.tsx index e62b670..c70b061 100644 --- a/Table/NejReactTable.tsx +++ b/Table/NejReactTable.tsx @@ -10,7 +10,20 @@ type TableInstanceProp = { export type NejReactTableOptions = Omit, "data"> & { data?: TData[] }; -export type CommonlyForwardedNejReactTableOptions = Omit, "data" | "columns"> +export type NejReactRenderActions = (props: { + cell: MRT_Cell; + column: MRT_Column; + renderedCellValue: ReactNode | number | string; + renderedColumnIndex?: number; + renderedRowIndex?: number; + row: MRT_Row; + rowRef?: RefObject; + table: MRT_TableInstance; +}) => ReactNode; + +export type CommonlyExposedNejReactTableProps = CommonlyForwardedNejReactTableOptions & { renderActions?: NejReactRenderActions } + +export type CommonlyForwardedNejReactTableOptions = Omit, "columns"> type Props = Xor< TableInstanceProp,