Skip to content

Commit f88c605

Browse files
committed
add final tweak
1 parent 432ee4f commit f88c605

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frame-one-table",
3-
"version": "0.3.9",
3+
"version": "0.3.10",
44
"description": "A react table with maximum flexibility.",
55
"main": "build/index.js",
66
"module": "build/index.es.js",

src/TableRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const TableRow: React.FC<ITableRowProps> = (props) => {
4242

4343
// Run value through formatter if it exists
4444
if (column.valueFormatter) {
45-
content = column.valueFormatter(content, cellContextDetails);
45+
content = column.valueFormatter(content ? content : rowData, cellContextDetails);
4646
}
4747

4848
// Convert value to string
@@ -53,7 +53,7 @@ const TableRow: React.FC<ITableRowProps> = (props) => {
5353

5454
// Reassign the content to the custom render function if it exists.
5555
if (column.cellRender) {
56-
content = column.cellRender(content, cellContextDetails);
56+
content = column.cellRender(content ? content : rowData, cellContextDetails);
5757
}
5858

5959
// Generate classes for the header cell.

0 commit comments

Comments
 (0)