rc-table
Version:
table ui component for react
11 lines (10 loc) • 568 B
TypeScript
import type { ExpandableConfig, ExpandableType, GetRowKey, Key, RenderExpandIcon, TriggerEventHandler } from '../interface';
import type { TableProps } from '../Table';
export default function useExpand<RecordType>(props: TableProps<RecordType>, mergedData: readonly RecordType[], getRowKey: GetRowKey<RecordType>): [
expandableConfig: ExpandableConfig<RecordType>,
expandableType: ExpandableType,
expandedKeys: Set<Key>,
expandIcon: RenderExpandIcon<RecordType>,
childrenColumnName: string,
onTriggerExpand: TriggerEventHandler<RecordType>
];