From 209e40508dd8221331e5e1267c9753dc961d396e Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 17 Sep 2018 18:26:03 +0800 Subject: [PATCH] fix sort --- components/table/Table.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 3d9b8b4ae8..2bc7b49f5c 100755 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -809,13 +809,13 @@ export default class Table extends React.Component, TableState< [`${prefixCls}-column-sort`]: isSortColumn && sortOrder, }), title: [ -
+
{column.title} {sortButton}
, filterDropdown, ], - onHeaderCell: (columnProps: ColumnProps) => { + onHeaderCell: sortButton ? (columnProps: ColumnProps) => { // for onHeaderCell compatibility const headerCellProps = column.onHeaderCell ? column.onHeaderCell(columnProps) : {}; return { @@ -828,7 +828,7 @@ export default class Table extends React.Component, TableState< title: locale.sortTitle, ...headerCellProps, }; - }, + } : column.onHeaderCell, }; }); }