Skip to content

Commit

Permalink
feat: show blank cells as blank
Browse files Browse the repository at this point in the history
instead of "-"
  • Loading branch information
Amelia Wattenberger committed Jan 20, 2022
1 parent 06b8f8c commit 75ac3ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/cells/date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function DateCell(props: DateCellProps) {
tw="overflow-ellipsis block whitespace-nowrap overflow-hidden"
title={props.rawValue}
>
{props.value ? formatDate(props.value) : '-'}
{props.value ? formatDate(props.value) : ''}
</span>
);
}
2 changes: 1 addition & 1 deletion src/components/cells/number.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface NumberCellProps {
export function NumberCell(props: NumberCellProps) {
return (
<span tw="text-right font-mono text-sm block w-full" title={props.rawValue}>
{Number.isFinite(props.value) ? props.value.toLocaleString() : '—'}
{Number.isFinite(props.value) ? props.value.toLocaleString() : !props.value ? "" : '—'}
</span>
);
}
2 changes: 1 addition & 1 deletion src/components/cells/time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function TimeCell(props: TimeCellProps) {
tw="overflow-ellipsis block whitespace-nowrap overflow-hidden"
title={props.rawValue}
>
{props.value ? formatTime(props.value) : '-'}
{props.value ? formatTime(props.value) : ''}
</span>
);
}

0 comments on commit 75ac3ce

Please sign in to comment.