tdesign-react
Version:
TDesign Component for React
38 lines (37 loc) • 1.48 kB
TypeScript
import React, { MutableRefObject, CSSProperties } from 'react';
import { RowAndColFixedPosition } from './interface';
import { ThRowspanAndColspan } from './hooks/useMultiHeader';
import { BaseTableCol, TableRowData, TdBaseTableProps } from './type';
import { AttachNode } from '../common';
export interface TheadProps {
classPrefix: string;
ellipsisOverlayClassName: string;
isFixedHeader: boolean;
maxHeight?: TdBaseTableProps['maxHeight'];
height?: TdBaseTableProps['height'];
rowAndColFixedPosition: RowAndColFixedPosition;
thWidthList?: {
[colKey: string]: number;
};
bordered: boolean;
isMultipleHeader: boolean;
thDraggable: boolean;
spansAndLeafNodes: {
rowspanAndColspanMap: ThRowspanAndColspan;
leafColumns: BaseTableCol<TableRowData>[];
};
thList: BaseTableCol<TableRowData>[][];
resizable?: boolean;
attach?: AttachNode;
showColumnShadow?: {
left: boolean;
right: boolean;
};
columnResizeParams?: {
resizeLineRef: MutableRefObject<HTMLDivElement>;
resizeLineStyle: CSSProperties;
onColumnMouseover: (e: React.MouseEvent<HTMLTableHeaderCellElement, MouseEvent>, col: BaseTableCol<TableRowData>) => void;
onColumnMousedown: (e: React.MouseEvent<HTMLTableHeaderCellElement, MouseEvent>, col: BaseTableCol<TableRowData>, index: number) => void;
};
}
export default function THead(props: TheadProps): React.JSX.Element;