hightable
Version:
A dynamic windowed scrolling table component for react
30 lines (29 loc) • 1.1 kB
TypeScript
import { CSSProperties, ReactNode } from 'react';
interface ColumnWidthsContextType {
getColumnWidth?: (columnIndex: number) => number | undefined;
getColumnStyle?: (columnIndex: number) => CSSProperties;
isFixedColumn?: (columnIndex: number) => boolean;
setAvailableWidth?: (width: number) => void;
forceWidth?: (options: {
columnIndex: number;
width: number;
minWidth?: number;
}) => void;
measureWidth?: (options: {
columnIndex: number;
measured: number;
}) => void;
removeWidth?: (options: {
columnIndex: number;
}) => void;
}
export declare const ColumnWidthsContext: import("react").Context<ColumnWidthsContextType>;
interface ColumnWidthsProviderProps {
localStorageKey?: string;
numColumns: number;
minWidth: number;
children: ReactNode;
}
export declare function ColumnWidthsProvider({ children, localStorageKey, numColumns, minWidth }: ColumnWidthsProviderProps): import("react/jsx-runtime").JSX.Element;
export declare function useColumnWidths(): ColumnWidthsContextType;
export {};