All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.lib.features.RowSelection.d.ts Maven / Gradle / Ivy

The newest version!
import { TableFeature } from '../core/table';
import { OnChangeFn, Table, Row, RowModel, Updater, RowData } from '../types';
export type RowSelectionState = Record;
export interface RowSelectionTableState {
    rowSelection: RowSelectionState;
}
export interface RowSelectionOptions {
    enableRowSelection?: boolean | ((row: Row) => boolean);
    enableMultiRowSelection?: boolean | ((row: Row) => boolean);
    enableSubRowSelection?: boolean | ((row: Row) => boolean);
    onRowSelectionChange?: OnChangeFn;
}
export interface RowSelectionRow {
    getIsSelected: () => boolean;
    getIsSomeSelected: () => boolean;
    getIsAllSubRowsSelected: () => boolean;
    getCanSelect: () => boolean;
    getCanMultiSelect: () => boolean;
    getCanSelectSubRows: () => boolean;
    toggleSelected: (value?: boolean) => void;
    getToggleSelectedHandler: () => (event: unknown) => void;
}
export interface RowSelectionInstance {
    getToggleAllRowsSelectedHandler: () => (event: unknown) => void;
    getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void;
    setRowSelection: (updater: Updater) => void;
    resetRowSelection: (defaultState?: boolean) => void;
    getIsAllRowsSelected: () => boolean;
    getIsAllPageRowsSelected: () => boolean;
    getIsSomeRowsSelected: () => boolean;
    getIsSomePageRowsSelected: () => boolean;
    toggleAllRowsSelected: (value?: boolean) => void;
    toggleAllPageRowsSelected: (value?: boolean) => void;
    getPreSelectedRowModel: () => RowModel;
    getSelectedRowModel: () => RowModel;
    getFilteredSelectedRowModel: () => RowModel;
    getGroupedSelectedRowModel: () => RowModel;
}
export declare const RowSelection: TableFeature;
export declare function selectRowsFn(table: Table, rowModel: RowModel): RowModel;
export declare function isRowSelected(row: Row, selection: Record): boolean;
export declare function isSubRowSelected(row: Row, selection: Record, table: Table): boolean | 'some' | 'all';




© 2015 - 2024 Weber Informatics LLC | Privacy Policy