Remove leading whitespace and replace it with '[...] ' in the Query Tool data grid so cells don't look empty.

Fixes #6427
This commit is contained in:
Dave Page
2021-07-01 09:17:35 +01:00
parent a2b67b933e
commit d90472014d
2 changed files with 14 additions and 4 deletions

View File

@@ -103,12 +103,21 @@
function TextFormatter(row, cell, value, columnDef) {
// If column has default value, set placeholder
var data = NullAndDefaultFormatter(row, cell, value, columnDef);
if (data) {
return data;
var raw = NullAndDefaultFormatter(row, cell, value, columnDef);
var data;
if (raw) {
data = raw;
} else {
return _.escape(value);
data = _.escape(value);
}
// Replace leading whitespace with a marker so we don't just show blank lines
if (data.trimStart() != data) {
data = '[...] ' + data.trimStart();
}
return data;
}
function BinaryFormatter(row, cell, value, columnDef) {