Skip to content

Commit 80ed65b

Browse files
authored
fix(table): When ellipsis is undefined, title is undefined. (#1110)
1 parent 4bcb4ae commit 80ed65b

File tree

6 files changed

+705
-3146
lines changed

6 files changed

+705
-3146
lines changed

src/Cell/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ const getTitleFromCellRenderChildren = ({
6161
children,
6262
}: Pick<CellProps<any>, 'ellipsis' | 'rowType' | 'children'>) => {
6363
let title: string;
64-
const ellipsisConfig: CellEllipsisType = ellipsis === true ? { showTitle: true } : ellipsis;
64+
const ellipsisConfig: CellEllipsisType =
65+
ellipsis === true || ellipsis === undefined ? { showTitle: true } : ellipsis;
6566
if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === 'header')) {
6667
if (typeof children === 'string' || typeof children === 'number') {
6768
title = children.toString();

0 commit comments

Comments
 (0)