From 957d362862c1f0679fd1930c1b1f863a064f528a Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Wed, 10 Jul 2024 13:47:25 +0100 Subject: [PATCH] fix: Undefined background color issue Text color ends up being white on white Signed-off-by: Gordon Smith --- packages/dgrid/src/Table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dgrid/src/Table.ts b/packages/dgrid/src/Table.ts index e11b0d2d0b..c1471f6c33 100644 --- a/packages/dgrid/src/Table.ts +++ b/packages/dgrid/src/Table.ts @@ -57,7 +57,7 @@ export class ColumnFormat extends PropertyExt { const cellText = defaultFormatter.call(this, cell, row); d3Select(cellElement) .style("background", background) - .style("color", Palette.textColor(background)) + .style("color", background && Palette.textColor(background)) .text(cellText?.html ?? cellText ?? cell) ; };