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

@ -23,6 +23,7 @@ Bug fixes
| `Issue #4189 <https://redmine.postgresql.org/issues/4189>`_ - Ensure that the Data Output panel can be snapped back after it is detached. | `Issue #4189 <https://redmine.postgresql.org/issues/4189>`_ - Ensure that the Data Output panel can be snapped back after it is detached.
| `Issue #6388 <https://redmine.postgresql.org/issues/6388>`_ - Fixed replace keyboard shortcut issue in the query tool on the normal keyboard layout. | `Issue #6388 <https://redmine.postgresql.org/issues/6388>`_ - Fixed replace keyboard shortcut issue in the query tool on the normal keyboard layout.
| `Issue #6398 <https://redmine.postgresql.org/issues/6398>`_ - Fixed an issue where detaching the query editor panel gives a blank white panel. | `Issue #6398 <https://redmine.postgresql.org/issues/6398>`_ - Fixed an issue where detaching the query editor panel gives a blank white panel.
| `Issue #6427 <https://redmine.postgresql.org/issues/6427>`_ - Remove leading whitespace and replace it with '[...] ' in the Query Tool data grid so cells don't look empty.
| `Issue #6448 <https://redmine.postgresql.org/issues/6448>`_ - Fixed an issue in the search object when searching in 'all types' or 'subscription' if the user doesn't have access to the subscription. | `Issue #6448 <https://redmine.postgresql.org/issues/6448>`_ - Fixed an issue in the search object when searching in 'all types' or 'subscription' if the user doesn't have access to the subscription.
| `Issue #6489 <https://redmine.postgresql.org/issues/6489>`_ - Fixed an issue where Execute/Refresh button should not be disabled when we run the empty query. | `Issue #6489 <https://redmine.postgresql.org/issues/6489>`_ - Fixed an issue where Execute/Refresh button should not be disabled when we run the empty query.
| `Issue #6505 <https://redmine.postgresql.org/issues/6505>`_ - Fixed an issue where the New Connection Drop Down has lost default maintenance database, auto-select, and tab-through functionality. | `Issue #6505 <https://redmine.postgresql.org/issues/6505>`_ - Fixed an issue where the New Connection Drop Down has lost default maintenance database, auto-select, and tab-through functionality.

View File

@ -103,12 +103,21 @@
function TextFormatter(row, cell, value, columnDef) { function TextFormatter(row, cell, value, columnDef) {
// If column has default value, set placeholder // If column has default value, set placeholder
var data = NullAndDefaultFormatter(row, cell, value, columnDef); var raw = NullAndDefaultFormatter(row, cell, value, columnDef);
if (data) {
return data; var data;
if (raw) {
data = raw;
} else { } 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) { function BinaryFormatter(row, cell, value, columnDef) {