UNPKG

tdesign-react

Version:
21 lines (20 loc) 828 B
import TableTreeStore from '@tdesign/common-js/table/tree-store'; import type { TableRowData, TdEnhancedTableProps } from '../type'; export declare function useTreeDataExpand(props: TdEnhancedTableProps, params: { store: InstanceType<typeof TableTreeStore>; dataSource: TdEnhancedTableProps['data']; setDataSource: React.Dispatch<React.SetStateAction<TableRowData[]>>; rowDataKeys: { rowKey: string; childrenKey: string; }; }): { expandAll: (type?: "expand-all" | "default-expand-all", list?: TableRowData[]) => void; foldAll: () => void; onExpandFoldIconClick: (p: { row: TableRowData; rowIndex: number; }, trigger?: "expand-fold-icon" | "row-click") => void; updateExpandOnDataChange: (data: TableRowData[]) => void; }; export default useTreeDataExpand;