2016-11-22 10:11:12 +08:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
export interface ColumnProps<T> {
|
|
|
|
title?: React.ReactNode;
|
|
|
|
key?: string;
|
|
|
|
dataIndex?: string;
|
|
|
|
render?: (text: any, record: T, index: number) => React.ReactNode;
|
2017-02-21 15:54:14 +08:00
|
|
|
filters?: { text: string; value: string, children?: any[] }[];
|
2016-11-22 10:11:12 +08:00
|
|
|
onFilter?: (value: any, record: T) => boolean;
|
|
|
|
filterMultiple?: boolean;
|
|
|
|
filterDropdown?: React.ReactNode;
|
2017-05-24 17:38:39 +08:00
|
|
|
filterDropdownVisible?: boolean;
|
|
|
|
onFilterDropdownVisibleChange?: (visible: boolean) => void;
|
2016-11-22 10:11:12 +08:00
|
|
|
sorter?: boolean | ((a: any, b: any) => number);
|
|
|
|
colSpan?: number;
|
|
|
|
width?: string | number;
|
|
|
|
className?: string;
|
|
|
|
fixed?: boolean | ('left' | 'right');
|
2017-03-27 17:38:14 +08:00
|
|
|
filterIcon?: React.ReactNode;
|
2016-11-22 10:11:12 +08:00
|
|
|
filteredValue?: any[];
|
|
|
|
sortOrder?: boolean | ('ascend' | 'descend');
|
2017-03-10 14:52:28 +08:00
|
|
|
children?: ColumnProps<T>[];
|
2017-05-29 18:17:01 +08:00
|
|
|
onCellClick?: (record: T, event: any) => void;
|
2016-11-22 10:11:12 +08:00
|
|
|
}
|
|
|
|
|
2017-06-01 14:47:49 +08:00
|
|
|
export default class Column<T> extends React.Component<ColumnProps<T>, React.ComponentState> {}
|