mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user