es-grid-template
Version:
es-grid-template
28 lines (27 loc) • 1.45 kB
TypeScript
import type { ArtColumnStaticPart } from '../../interfaces';
import type { TablePipeline } from '../pipeline';
export interface MultiSelectFeatureOptions {
/** Uncontrolled usage: default selected values */
defaultValue?: string[];
/** Uncontrolled usage: default lastKey */
defaultLastKey?: string;
/** Controlled usage: currently selected keys */
value?: string[];
/** Controlled usage: rowKey of the last action */
lastKey?: string;
/** Controlled usage: state change callback */
onChange?: (nextValue: string[], key: string, keys: string[], action: 'check' | 'uncheck' | 'check-all' | 'uncheck-all') => void;
/** Position of the checkbox column */
checkboxPlacement?: 'start' | 'end';
/** Column config for the checkbox column; can specify width, lock, title, align, features, etc. */
checkboxColumn?: Partial<ArtColumnStaticPart>;
/** Whether to highlight selected rows */
highlightRowWhenSelected?: boolean;
/** Determine whether the checkbox in a row should be disabled */
isDisabled?: (row: any, rowIndex: number) => boolean;
/** Area that responds to click events */
clickArea?: 'checkbox' | 'cell' | 'row';
/** Whether to call event.stopPropagation() for click events that trigger onChange */
stopClickEventPropagation?: boolean;
}
export declare function multiSelect(opts?: MultiSelectFeatureOptions): (pipeline: TablePipeline) => TablePipeline;