package.build.lib.features.ColumnSizing.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 { OnChangeFn, Updater } from '../types';
import { ColumnPinningPosition } from './Pinning';
export interface ColumnSizingTableState {
columnSizing: ColumnSizingState;
columnSizingInfo: ColumnSizingInfoState;
}
export type ColumnSizingState = Record;
export interface ColumnSizingInfoState {
startOffset: null | number;
startSize: null | number;
deltaOffset: null | number;
deltaPercentage: null | number;
isResizingColumn: false | string;
columnSizingStart: [string, number][];
}
export type ColumnResizeMode = 'onChange' | 'onEnd';
export interface ColumnSizingOptions {
enableColumnResizing?: boolean;
columnResizeMode?: ColumnResizeMode;
onColumnSizingChange?: OnChangeFn;
onColumnSizingInfoChange?: OnChangeFn;
}
export interface ColumnSizingDefaultOptions {
columnResizeMode: ColumnResizeMode;
onColumnSizingChange: OnChangeFn;
onColumnSizingInfoChange: OnChangeFn;
}
export interface ColumnSizingInstance {
setColumnSizing: (updater: Updater) => void;
setColumnSizingInfo: (updater: Updater) => void;
resetColumnSizing: (defaultState?: boolean) => void;
resetHeaderSizeInfo: (defaultState?: boolean) => void;
getTotalSize: () => number;
getLeftTotalSize: () => number;
getCenterTotalSize: () => number;
getRightTotalSize: () => number;
}
export interface ColumnSizingColumnDef {
enableResizing?: boolean;
size?: number;
minSize?: number;
maxSize?: number;
}
export interface ColumnSizingColumn {
getSize: () => number;
getStart: (position?: ColumnPinningPosition) => number;
getCanResize: () => boolean;
getIsResizing: () => boolean;
resetSize: () => void;
}
export interface ColumnSizingHeader {
getSize: () => number;
getStart: (position?: ColumnPinningPosition) => number;
getResizeHandler: () => (event: unknown) => void;
}
export declare const defaultColumnSizing: {
size: number;
minSize: number;
maxSize: number;
};
export declare const ColumnSizing: TableFeature;
export declare function passiveEventSupported(): boolean;
© 2015 - 2024 Weber Informatics LLC | Privacy Policy