package.build.lib.features.Visibility.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of table-core Show documentation
Show all versions of table-core Show documentation
Headless UI for building powerful tables & datagrids for TS/JS.
The newest version!
import { TableFeature } from '../core/table';
import { Cell, Column, OnChangeFn, Updater, RowData } from '../types';
export type VisibilityState = Record;
export interface VisibilityTableState {
columnVisibility: VisibilityState;
}
export interface VisibilityOptions {
onColumnVisibilityChange?: OnChangeFn;
enableHiding?: boolean;
}
export interface VisibilityDefaultOptions {
onColumnVisibilityChange: OnChangeFn;
}
export interface VisibilityInstance {
getVisibleFlatColumns: () => Column[];
getVisibleLeafColumns: () => Column[];
getLeftVisibleLeafColumns: () => Column[];
getRightVisibleLeafColumns: () => Column[];
getCenterVisibleLeafColumns: () => Column[];
setColumnVisibility: (updater: Updater) => void;
resetColumnVisibility: (defaultState?: boolean) => void;
toggleAllColumnsVisible: (value?: boolean) => void;
getIsAllColumnsVisible: () => boolean;
getIsSomeColumnsVisible: () => boolean;
getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void;
}
export interface VisibilityColumnDef {
enableHiding?: boolean;
}
export interface VisibilityRow {
_getAllVisibleCells: () => Cell[];
getVisibleCells: () => Cell[];
}
export interface VisibilityColumn {
getCanHide: () => boolean;
getIsVisible: () => boolean;
toggleVisibility: (value?: boolean) => void;
getToggleVisibilityHandler: () => (event: unknown) => void;
}
export declare const Visibility: TableFeature;
© 2015 - 2024 Weber Informatics LLC | Privacy Policy