2016-11-22 10:11:12 +08:00
|
|
|
import React from 'react';
|
|
|
|
import RcTable from 'rc-table';
|
|
|
|
|
|
|
|
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;
|
|
|
|
sorter?: boolean | ((a: any, b: any) => number);
|
|
|
|
colSpan?: number;
|
|
|
|
width?: string | number;
|
|
|
|
className?: string;
|
|
|
|
fixed?: boolean | ('left' | 'right');
|
|
|
|
filteredValue?: any[];
|
|
|
|
sortOrder?: boolean | ('ascend' | 'descend');
|
|
|
|
}
|
|
|
|
|
|
|
|
export default class Column<T> extends (RcTable.Column as React.ComponentClass<ColumnProps<T>>) {}
|