ant-design/components/table/Column.tsx
Wei Zhu f78d33ed59
Update rc-table (#8187)
* Update rc-table

* Add table drag sorting demo
2017-11-17 18:53:07 +08:00

29 lines
994 B
TypeScript

import * as React from 'react';
export interface ColumnProps<T> {
title?: React.ReactNode;
key?: string;
dataIndex?: string;
render?: (text: any, record: T, index: number) => React.ReactNode;
filters?: { text: string; value: string, children?: any[] }[];
onFilter?: (value: any, record: T) => boolean;
filterMultiple?: boolean;
filterDropdown?: React.ReactNode;
filterDropdownVisible?: boolean;
onFilterDropdownVisibleChange?: (visible: boolean) => void;
sorter?: boolean | ((a: any, b: any) => number);
defaultSortOrder?: 'ascend' | 'descend';
colSpan?: number;
width?: string | number;
className?: string;
fixed?: boolean | ('left' | 'right');
filterIcon?: React.ReactNode;
filteredValue?: any[];
sortOrder?: boolean | ('ascend' | 'descend');
children?: ColumnProps<T>[];
onCellClick?: (record: T, event: any) => void;
onCell?: (record: T) => any;
}
export default class Column<T> extends React.Component<ColumnProps<T>, React.ComponentState> {}