opt-table
Version:
A Responsive and Customizable Rich Table
23 lines (22 loc) • 894 B
TypeScript
import React from "react";
import { OptTableInterface, OptTableRefProps } from "../components";
type ContextProps = {
is_edited: null | number | string;
set_is_edited?: React.Dispatch<React.SetStateAction<string | number | null>>;
set_row_to_edit?: (id: string | number) => void;
set_current_row?: React.Dispatch<React.SetStateAction<{
index: number | string;
table_key: string;
} | null>>;
current_row?: {
index: number | string;
table_key: string;
} | null;
};
export declare const tableContext: React.Context<ContextProps>;
type Props<T> = {
children: React.ReactNode;
table_props?: OptTableInterface<T>;
};
export declare const TableContextProvider: <T>(props: Props<T> & React.RefAttributes<OptTableRefProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
export {};