You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
1.1 KiB

import * as React from 'react';
import { ColumnsType, ColumnType, Key, GetRowKey, TriggerEventHandler, RenderExpandIcon } from '../interface';
export declare function convertChildrenToColumns<RecordType>(children: React.ReactNode): ColumnsType<RecordType>;
/**
* Parse `columns` & `children` into `columns`.
*/
declare function useColumns<RecordType>({ prefixCls, columns, children, expandable, expandedKeys, getRowKey, onTriggerExpand, expandIcon, rowExpandable, expandIconColumnIndex, direction, expandRowByClick, }: {
prefixCls?: string;
columns?: ColumnsType<RecordType>;
children?: React.ReactNode;
expandable: boolean;
expandedKeys: Set<Key>;
getRowKey: GetRowKey<RecordType>;
onTriggerExpand: TriggerEventHandler<RecordType>;
expandIcon?: RenderExpandIcon<RecordType>;
rowExpandable?: (record: RecordType) => boolean;
expandIconColumnIndex?: number;
direction?: 'ltr' | 'rtl';
expandRowByClick?: boolean;
}, transformColumns: (columns: ColumnsType<RecordType>) => ColumnsType<RecordType>): [ColumnsType<RecordType>, ColumnType<RecordType>[]];
export default useColumns;