Skip to content

Commit

Permalink
fix type of column dataIndex (#9298)
Browse files Browse the repository at this point in the history
  • Loading branch information
clinyong authored and yesmeck committed Feb 8, 2018
1 parent a8f1c35 commit f8e996e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/table/Table.tsx
Expand Up @@ -696,7 +696,7 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
const { prefixCls, dropdownPrefixCls } = this.props;
const { sortOrder } = this.state;
return treeMap(columns, (originColumn, i) => {
let column = { ...originColumn };
let column: ColumnProps<T> = { ...originColumn };
let key = this.getColumnKey(column, i) as string;
let filterDropdown;
let sortButton;
Expand Down
2 changes: 1 addition & 1 deletion components/table/interface.tsx
Expand Up @@ -9,7 +9,7 @@ export type ColumnFilterItem = { text: string; value: string, children?: ColumnF
export interface ColumnProps<T> {
title?: React.ReactNode;
key?: React.Key;
dataIndex?: string;
dataIndex?: keyof T;
render?: (text: any, record: T, index: number) => React.ReactNode;
filters?: ColumnFilterItem[];
onFilter?: (value: any, record: T) => boolean;
Expand Down

0 comments on commit f8e996e

Please sign in to comment.