import * as React from 'react'; import * as PropTypes from 'prop-types'; import ColumnManager from './ColumnManager'; import ColumnGroup from './ColumnGroup'; import { ExpandableTableProps } from './ExpandableTable'; import { ColumnType, GetRowKey, GetComponentProps, LegacyFunction, TableComponents, TableStore, DefaultValueType, ScrollPosition, Expander } from './interface'; export interface TableProps extends Omit, 'prefixCls' | 'children'> { data?: ValueType[]; useFixedHeader?: boolean; columns?: ColumnType[]; prefixCls?: string; bodyStyle?: React.CSSProperties; className?: string; style?: React.CSSProperties; rowKey?: string | GetRowKey; rowClassName?: string | ((record: ValueType, index: number, indent: number) => string); onRow?: GetComponentProps; onHeaderRow?: GetComponentProps; onRowClick?: LegacyFunction; onRowDoubleClick?: LegacyFunction; onRowContextMenu?: LegacyFunction; onRowMouseEnter?: LegacyFunction; onRowMouseLeave?: LegacyFunction; showHeader?: boolean; title?: (data: ValueType[]) => React.ReactNode; id?: string; footer?: (data: ValueType[]) => React.ReactNode; emptyText?: React.ReactNode | (() => React.ReactNode); scroll?: { x?: number | true | string; y?: number; }; rowRef?: (record: ValueType, index: number, indent: number) => React.Ref; getBodyWrapper?: (body: React.ReactElement) => React.ReactElement; children?: React.ReactNode; components?: TableComponents; tableLayout?: 'fixed'; } interface TableState { columns?: ColumnType[]; children?: React.ReactNode; } declare class Table extends React.Component, TableState> { static childContextTypes: { table: PropTypes.Requireable; components: PropTypes.Requireable; }; static Column: React.FC; static ColumnGroup: typeof ColumnGroup; static defaultProps: { data: any[]; useFixedHeader: boolean; rowKey: string; rowClassName: () => string; onRow(): void; onHeaderRow(): void; prefixCls: string; bodyStyle: {}; style: {}; showHeader: boolean; scroll: {}; rowRef: () => any; emptyText: () => string; }; constructor(props: TableProps); state: TableState; columnManager: ColumnManager; store: TableStore; debouncedWindowResize: Function & { cancel: Function; }; resizeEvent: { remove: Function; }; headTable: HTMLDivElement; bodyTable: HTMLDivElement; tableNode: HTMLDivElement; scrollPosition: ScrollPosition; lastScrollLeft: number; lastScrollTop: number; fixedColumnsBodyLeft: HTMLDivElement; fixedColumnsBodyRight: HTMLDivElement; expander: Expander; getChildContext(): { table: { props: Readonly> & Readonly<{ children?: React.ReactNode; }>; columnManager: ColumnManager; saveRef: (name: string) => (node: HTMLElement) => void; components: any; }; }; static getDerivedStateFromProps(nextProps: TableProps, prevState: TableState): { columns: ColumnType>[]; children: any; } | { columns: any; children: React.ReactNode; }; componentDidMount(): void; componentDidUpdate(prevProps: any): void; componentWillUnmount(): void; getRowKey: (record: ValueType, index: number) => any; setScrollPosition(position: ScrollPosition): void; setScrollPositionClassName(): void; isTableLayoutFixed(): boolean; handleWindowResize: () => void; syncFixedTableRowHeight: () => void; resetScrollX(): void; hasScrollX(): boolean; handleBodyScrollLeft: React.UIEventHandler; handleBodyScrollTop: React.UIEventHandler; handleBodyScroll: React.UIEventHandler; handleWheel: React.WheelEventHandler; saveRef: (name: string) => (node: HTMLElement) => void; saveTableNodeRef: (node: HTMLDivElement) => void; renderMainTable(): JSX.Element | (JSX.Element | JSX.Element[])[]; renderLeftFixedTable(): JSX.Element; renderRightFixedTable(): JSX.Element; renderTable(options: any): JSX.Element[]; renderTitle(): JSX.Element; renderFooter(): JSX.Element; renderEmptyText(): JSX.Element; render(): JSX.Element; } export default Table;