UNPKG

hightable

Version:

A dynamic windowed scrolling table component for react

21 lines (20 loc) 1 kB
import type { ReactNode } from 'react'; import type { HighTableProps } from '../types.js'; type ColumnsVisibilityProviderProps = Pick<HighTableProps, 'columnsVisibility' | 'onColumnsVisibilityChange'> & { /** Children components */ children: ReactNode; }; interface HiddenColumn { /** True if the column is hidden, default is false */ hidden: true; } /** Hidden column if defined and hidden field is true, shown otherwise */ type ColumnVisibility = HiddenColumn | undefined; /** Record of column visibility keyed by column name */ export type ColumnsVisibility = Record<string, ColumnVisibility>; /** * Provide the columns visibility to the table, i.e. which columns are hidden, plus actions to hide/show columns, * through the ColumnsVisibilityContext. */ export declare function ColumnsVisibilityProvider({ children, columnsVisibility: controlledColumnsVisibility, onColumnsVisibilityChange }: ColumnsVisibilityProviderProps): import("react/jsx-runtime").JSX.Element; export {};