UNPKG

tdesign-react

Version:
14 lines (13 loc) 669 B
import React from 'react'; import { TdPrimaryTableProps, PrimaryTableCol, TableRowData, TableExpandedRowParams, RowEventContext, RowClassNameParams } from '../type'; export default function useRowExpand(props: TdPrimaryTableProps): { showExpandedRow: boolean; showExpandIconColumn: boolean; getExpandColumn: () => PrimaryTableCol<TableRowData>; renderExpandedRow: (p: TableExpandedRowParams<TableRowData> & { tableWidth: number; isWidthOverflow: boolean; }) => React.JSX.Element; onInnerExpandRowClick: (p: RowEventContext<TableRowData>) => void; getExpandedRowClass: (params: RowClassNameParams<TableRowData>) => string; };