Skip to content

Commit

Permalink
Revert "fix(table): When ellipsis is undefined, title is undefined" (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Aug 15, 2024
1 parent 386a1f5 commit 8bee472
Show file tree
Hide file tree
Showing 7 changed files with 3,146 additions and 912 deletions.
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install lint-staged
3 changes: 1 addition & 2 deletions src/Cell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ const getTitleFromCellRenderChildren = ({
children,
}: Pick<CellProps<any>, 'ellipsis' | 'rowType' | 'children'>) => {
let title: string;
const ellipsisConfig: CellEllipsisType =
ellipsis === true || ellipsis === undefined ? { showTitle: true } : ellipsis;
const ellipsisConfig: CellEllipsisType = ellipsis === true ? { 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 8bee472

Please sign in to comment.