UNPKG

997 BTypeScriptView Raw
1import * as React from 'react';
2import type useRowInfo from '../hooks/useRowInfo';
3import type { ColumnType, CustomizeComponent } from '../interface';
4export interface VirtualCellProps<RecordType> {
5 rowInfo: ReturnType<typeof useRowInfo<RecordType>>;
6 column: ColumnType<RecordType>;
7 colIndex: number;
8 indent: number;
9 index: number;
10 component?: CustomizeComponent;
11 /** Used for `column.render` */
12 renderIndex: number;
13 record: RecordType;
14 style?: React.CSSProperties;
15 className?: string;
16 /** Render cell only when it has `rowSpan > 1` */
17 inverse?: boolean;
18 getHeight?: (rowSpan: number) => number;
19}
20/**
21 * Return the width of the column by `colSpan`.
22 * When `colSpan` is `0` will be trade as `1`.
23 */
24export declare function getColumnWidth(colIndex: number, colSpan: number, columnsOffset: number[]): number;
25declare function VirtualCell<RecordType = any>(props: VirtualCellProps<RecordType>): React.JSX.Element;
26export default VirtualCell;