8000 feat: show blank cells as blank · githubocto/flat-ui@75ac3ce · GitHub
[go: up one dir, main page]

Skip to content

Commit 75ac3ce

Browse files
author
Amelia Wattenberger
committed
feat: show blank cells as blank
instead of "-"
1 parent 06b8f8c commit 75ac3ce

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/cells/date.tsx

Copy file name to clipboard
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function DateCell(props: DateCellProps) {
1414
tw="overflow-ellipsis block whitespace-nowrap overflow-hidden"
1515
title={props.rawValue}
1616
>
17-
{props.value ? formatDate(props.value) : '-'}
17+
{props.value ? formatDate(props.value) : ''}
1818
</span>
1919
);
2020
}

src/components/cells/number.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface NumberCellProps {
88
export function NumberCell(props: NumberCellProps) {
99
return (
1010
<span tw="text-right font-mono text-sm block w-full" title={props.rawValue}>
11-
{Number.isFinite(props.value) ? props.value.toLocaleString() : '—'}
11+
{Number.isFinite(props.value) ? props.value.toLocaleString() : !props.value ? "" : '—'}
1212
</span>
1313
);
1414
}

src/components/cells/time.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function TimeCell(props: TimeCellProps) {
1515
tw="overflow-ellipsis block whitespace-nowrap overflow-hidden"
1616
title={props.rawValue}
1717
>
18-
{props.value ? formatTime(props.value) : '-'}
18+
{props.value ? formatTime(props.value) : ''}
1919
</span>
2020
);
2121
}

0 commit comments

Comments
 (0)
0