Skip to content

Commit

Permalink
Merge pull request #4211 from GordonSmith/DGRID_CELL_RENDER_HIDE
Browse files Browse the repository at this point in the history
fix: Custom cell render fails with plain string
  • Loading branch information
GordonSmith authored Jul 9, 2024
2 parents 63af377 + 3cd8004 commit 5e09c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/dgrid/src/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ColumnFormat extends PropertyExt {
d3Select(cellElement)
.style("background", background)
.style("color", Palette.textColor(background))
.text(cellText.html ? cellText.html : cell)
.text(cellText?.html ?? cellText ?? cell)
;
};
}
Expand Down Expand Up @@ -184,7 +184,7 @@ export class Table extends Common {
}
}
}
this._dgrid.set("columns", this._columns);
this._dgrid.set("columns", this._columns.filter(col => !col.hidden));
this._colsRefresh = false;
}
if (this._colsRefresh || this._dataRefresh) {
Expand Down

0 comments on commit 5e09c02

Please sign in to comment.