Skip to content

Commit

Permalink
✅ fix invalid title in div
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 13, 2018
1 parent 9c77723 commit 860809f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
</div>
);
}
const sortTitleString = (sortButton && typeof sortTitle === 'string') ? sortTitle : undefined;
return {
...column,
className: classNames(column.className, {
Expand All @@ -851,7 +852,7 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
title: [
<div
key="title"
title={sortButton ? sortTitle : undefined}
title={sortTitleString}
className={sortButton ? `${prefixCls}-column-sorters` : undefined}
onClick={() => this.toggleSortOrder(column)}
>
Expand Down

0 comments on commit 860809f

Please sign in to comment.