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 | import * as React from 'react';
|
27 | import { GetRowKey, ColumnsType, TableComponents, DefaultRecordType, GetComponentProps, ExpandableConfig, LegacyExpandableProps, PanelRender, TableLayout, RowClassName, ColumnType } from './interface';
|
28 | export declare const INTERNAL_HOOKS = "rc-table-internal-hook";
|
29 | export interface TableProps<RecordType = unknown> extends LegacyExpandableProps<RecordType> {
|
30 | prefixCls?: string;
|
31 | className?: string;
|
32 | style?: React.CSSProperties;
|
33 | children?: React.ReactNode;
|
34 | data?: RecordType[];
|
35 | columns?: ColumnsType<RecordType>;
|
36 | rowKey?: string | GetRowKey<RecordType>;
|
37 | tableLayout?: TableLayout;
|
38 | scroll?: {
|
39 | x?: number | true | string;
|
40 | y?: number | string;
|
41 | };
|
42 |
|
43 | expandable?: ExpandableConfig<RecordType>;
|
44 | indentSize?: number;
|
45 | rowClassName?: string | RowClassName<RecordType>;
|
46 | title?: PanelRender<RecordType>;
|
47 | footer?: PanelRender<RecordType>;
|
48 | summary?: (data: RecordType[]) => React.ReactNode;
|
49 | id?: string;
|
50 | showHeader?: boolean;
|
51 | components?: TableComponents<RecordType>;
|
52 | onRow?: GetComponentProps<RecordType>;
|
53 | onHeaderRow?: GetComponentProps<ColumnType<RecordType>[]>;
|
54 | emptyText?: React.ReactNode | (() => React.ReactNode);
|
55 | direction?: 'ltr' | 'rtl';
|
56 | /**
|
57 | * @private Internal usage, may remove by refactor. Should always use `columns` instead.
|
58 | *
|
59 | * !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
|
60 | */
|
61 | internalHooks?: string;
|
62 | /**
|
63 | * @private Internal usage, may remove by refactor. Should always use `columns` instead.
|
64 | *
|
65 | * !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
|
66 | */
|
67 | transformColumns?: (columns: ColumnsType<RecordType>) => ColumnsType<RecordType>;
|
68 | |
69 |
|
70 |
|
71 |
|
72 |
|
73 | internalRefs?: {
|
74 | body: React.MutableRefObject<HTMLDivElement>;
|
75 | };
|
76 | }
|
77 | declare function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordType>): JSX.Element;
|
78 | declare namespace Table {
|
79 | var Column: typeof import("./sugar/Column").default;
|
80 | var ColumnGroup: typeof import("./sugar/ColumnGroup").default;
|
81 | var Summary: {
|
82 | Cell: typeof import("./Footer/Cell").default;
|
83 | Row: typeof import("./Footer/Row").default;
|
84 | };
|
85 | var defaultProps: {
|
86 | rowKey: string;
|
87 | prefixCls: string;
|
88 | emptyText: () => string;
|
89 | };
|
90 | }
|
91 | export default Table;
|