mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 12:10:06 +08:00
ed455c01d1
* Implement Table.Column and Table.ColumnGroup * Upgrade rc-table
23 lines
723 B
TypeScript
23 lines
723 B
TypeScript
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;
|
|
filters?: { text: string; value: string }[];
|
|
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>>) {}
|