Skip to content

Commit

Permalink
fix: Undefined background color issue
Browse files Browse the repository at this point in the history
Text color ends up being white on white

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
  • Loading branch information
GordonSmith committed Jul 10, 2024
1 parent 3f1fde3 commit 957d362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dgrid/src/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
;
};
Expand Down

0 comments on commit 957d362

Please sign in to comment.