Merge pull request #1544 from ostephens/display-null

Added display of `null` in data table view
This commit is contained in:
Owen Stephens 2018-03-21 00:23:20 +01:00 committed by GitHub
commit 6eb90c0ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -60,7 +60,7 @@ DataTableCellUI.prototype._render = function() {
.mouseleave(function() { editLink.css("visibility", "hidden"); }); .mouseleave(function() { editLink.css("visibility", "hidden"); });
if (!cell || ("v" in cell && cell.v === null)) { if (!cell || ("v" in cell && cell.v === null)) {
$('<span>').html("&nbsp;").appendTo(divContent); $('<span>').addClass("data-table-null").html('null').appendTo(divContent);
} else if ("e" in cell) { } else if ("e" in cell) {
$('<span>').addClass("data-table-error").text(cell.e).appendTo(divContent); $('<span>').addClass("data-table-error").text(cell.e).appendTo(divContent);
} else if (!("r" in cell) || !cell.r) { } else if (!("r" in cell) || !cell.r) {

View File

@ -201,6 +201,10 @@ div.data-table-cell-content-numeric > a.data-table-cell-edit {
color: #282; color: #282;
} }
.data-table-null {
color: #aaa;
}
.data-table-error { .data-table-error {
color: red; color: red;
} }