Table.d.ts
3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* Feature:
* - fixed not need to set width
* - support `rowExpandable` to config row expand logic
* - add `summary` to support `() => ReactNode`
*
* Update:
* - `dataIndex` is `array[]` now
* - `expandable` wrap all the expand related props
*
* Removed:
* - expandIconAsCell
* - useFixedHeader
* - rowRef
* - columns[number].onCellClick
* - onRowClick
* - onRowDoubleClick
* - onRowMouseEnter
* - onRowMouseLeave
* - getBodyWrapper
* - bodyStyle
*
* Deprecated:
* - All expanded props, move into expandable
*/
import * as React from 'react';
import { GetRowKey, ColumnsType, TableComponents, DefaultRecordType, GetComponentProps, ExpandableConfig, LegacyExpandableProps, PanelRender, TableLayout, RowClassName, ColumnType, TableSticky } from './interface';
export declare const INTERNAL_HOOKS = "rc-table-internal-hook";
export interface TableProps<RecordType = unknown> extends LegacyExpandableProps<RecordType> {
prefixCls?: string;
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
data?: RecordType[];
columns?: ColumnsType<RecordType>;
rowKey?: string | GetRowKey<RecordType>;
tableLayout?: TableLayout;
scroll?: {
x?: number | true | string;
y?: number | string;
};
/** Config expand rows */
expandable?: ExpandableConfig<RecordType>;
indentSize?: number;
rowClassName?: string | RowClassName<RecordType>;
title?: PanelRender<RecordType>;
footer?: PanelRender<RecordType>;
summary?: (data: RecordType[]) => React.ReactNode;
id?: string;
showHeader?: boolean;
components?: TableComponents<RecordType>;
onRow?: GetComponentProps<RecordType>;
onHeaderRow?: GetComponentProps<ColumnType<RecordType>[]>;
emptyText?: React.ReactNode | (() => React.ReactNode);
direction?: 'ltr' | 'rtl';
/**
* @private Internal usage, may remove by refactor. Should always use `columns` instead.
*
* !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
*/
internalHooks?: string;
/**
* @private Internal usage, may remove by refactor. Should always use `columns` instead.
*
* !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
*/
transformColumns?: (columns: ColumnsType<RecordType>) => ColumnsType<RecordType>;
/**
* @private Internal usage, may remove by refactor.
*
* !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
*/
internalRefs?: {
body: React.MutableRefObject<HTMLDivElement>;
};
sticky?: boolean | TableSticky;
}
declare function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordType>): JSX.Element;
declare namespace Table {
var Column: typeof import("./sugar/Column").default;
var ColumnGroup: typeof import("./sugar/ColumnGroup").default;
var Summary: {
Cell: typeof import("./Footer/Cell").default;
Row: typeof import("./Footer/Row").default;
};
var defaultProps: {
rowKey: string;
prefixCls: string;
emptyText: () => string;
};
}
export default Table;