Skip to content

Commit

Permalink
fix(sql lab): NULL styling in grid cell (apache#17385)
Browse files Browse the repository at this point in the history
* Fix NULL styling in gridCell

* removed unnecessary imports

* Added null styling back to renderGridCell

* Cleaned up a little code as per Elizabeth

* Found another little cleanup spot
  • Loading branch information
lyndsiWilliams authored Nov 15, 2021
1 parent 71e3fa1 commit eb029ab
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,9 @@ export default class FilterableTable extends PureComponent<
}) {
const columnKey = this.props.orderedColumnKeys[columnIndex];
const cellData = this.list[rowIndex][columnKey];
const cellText = this.getCellContent({ cellData, columnKey });
const content =
cellData === null ? (
<i className="text-muted">
{this.getCellContent({ cellData, columnKey })}
</i>
) : (
this.getCellContent({ cellData, columnKey })
);
cellData === null ? <i className="text-muted">{cellText}</i> : cellText;
const cellNode = (
<div
key={key}
Expand Down Expand Up @@ -531,11 +526,13 @@ export default class FilterableTable extends PureComponent<
columnKey: string;
}) {
const cellNode = this.getCellContent({ cellData, columnKey });
const content =
cellData === null ? <i className="text-muted">{cellNode}</i> : cellNode;
const jsonObject = safeJsonObjectParse(cellData);
if (jsonObject) {
return this.addJsonModal(cellNode, jsonObject, cellData);
}
return cellNode;
return content;
}

renderTable() {
Expand Down

0 comments on commit eb029ab

Please sign in to comment.