visual-grid
Version:
JavaScript Data Table
41 lines (40 loc) • 1.19 kB
TypeScript
import { Store as BaseStore } from "../../../grid/store";
import { RowData } from "../../../types";
export interface Actions {
setCellValue: {
row: string;
column: string;
value: any;
};
setHoveredRow: string | undefined;
selectRows: string[];
appendRowsBefore: {
index: number;
rows: RowData[];
};
takeRows: string[];
clear: undefined;
setBaseHeight: number;
}
export interface State {
rows: RowData[];
rowIndexes: Record<string, number>;
hoveredRow?: string;
selectedRows: string[];
height: number;
}
export declare class Store extends BaseStore<State, Actions> {
constructor(initial?: Partial<State>);
appendRowsBefore(index: number, rows: RowData[]): void;
appendRows(rows: RowData[]): void;
selectRows(rows: string[]): void;
appendSelectRows(rows: string[]): void;
takeSelectRow(row: string): void;
getRowIds(): string[];
getRowIdByIndex(y: number): string;
getRowIndex(id: string): number;
getRowDataByIndex(y: number): RowData;
getRowData(row: string): RowData;
getRawCellValue(row: string, column: string): any;
}
export default Store;