Skip to content

Commit

Permalink
fix(table): When ellipsis is undefined, title is undefined. (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuba-Ahhh authored Jun 10, 2024
1 parent 4bcb4ae commit 80ed65b
Show file tree
Hide file tree
Showing 6 changed files with 705 additions and 3,146 deletions.
3 changes: 2 additions & 1 deletion src/Cell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const getTitleFromCellRenderChildren = ({
children,
}: Pick<CellProps<any>, 'ellipsis' | 'rowType' | 'children'>) => {
let title: string;
const ellipsisConfig: CellEllipsisType = ellipsis === true ? { showTitle: true } : ellipsis;
const ellipsisConfig: CellEllipsisType =
ellipsis === true || ellipsis === undefined ? { showTitle: true } : ellipsis;
if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === 'header')) {
if (typeof children === 'string' || typeof children === 'number') {
title = children.toString();
Expand Down
Loading

0 comments on commit 80ed65b

Please sign in to comment.