@oceanbase-odc/ob-react-data-grid
Version:
Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like
24 lines • 1.13 kB
TypeScript
import { CellContextProps } from "../Row";
import { CalculatedColumn, ISelectRange, ISelectorEvent } from "../types";
interface IProps<TRow, TSummaryRow> {
viewportColumns: readonly CalculatedColumn<TRow, TSummaryRow>[];
lazyStore: Map<string, any>;
selectedRange: ISelectRange;
selectedRows: Set<string>;
selectedColumns: Set<string>;
rows: TRow[];
headerRowsCount: number;
scrollTop: number;
rowKeyName: string;
rowKeyGetter: (row: {
[key: string]: any;
}) => string;
onGridSelect: (data: ISelectorEvent) => void;
}
export default function useRowContext<TRow, TSummaryRow>({ setShowMenuRowIdx, getContextMenuConfig, ContextMenuRender, onGridSelect, viewportColumns, lazyStore, selectedRange, selectedRows, selectedColumns, rows, rowKeyName, rowKeyGetter, scrollTop, headerRowsCount }: CellContextProps & IProps<TRow, TSummaryRow>): {
contextMenuElement: import("react").JSX.Element | null;
handleContextMenu: (event: React.MouseEvent<HTMLDivElement>) => false | undefined;
handleResetContext: () => void;
};
export {};
//# sourceMappingURL=useRowContext.d.ts.map