From c161f8d8ad3483c5d8a4504c2f7ee3bd0f24d622 Mon Sep 17 00:00:00 2001 From: Alex Ma Date: Thu, 9 Jan 2020 10:23:11 -0800 Subject: [PATCH] Added fix for italics for last row (#8773) * Added fix for italics for last row * Added null handling in formatters * Fixed issue with null not italicizing on grid * small formatting fix * some consolidation * removed null check * minor change * removed null check in formatters --- .../contrib/editData/browser/editData.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/editData/browser/editData.component.ts b/src/sql/workbench/contrib/editData/browser/editData.component.ts index 69d65513c6..568cefcdba 100644 --- a/src/sql/workbench/contrib/editData/browser/editData.component.ts +++ b/src/sql/workbench/contrib/editData/browser/editData.component.ts @@ -172,7 +172,7 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On let returnVal = ''; // replace the line breaks with space since the edit text control cannot // render line breaks and strips them, updating the value. - if (Services.DBCellValue.isDBCellValue(value)) { + if (Services.DBCellValue.isDBCellValue(value) && !value.isNull) { returnVal = this.spacefyLinebreaks(value.displayValue); } else if (typeof value === 'string') { returnVal = this.spacefyLinebreaks(value); @@ -220,7 +220,9 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On // should add null row? if (offset + count > this.dataSet.totalRows - 1) { gridData.push(this.dataSet.columnDefinitions.reduce((p, c) => { - p[c.field] = 'NULL'; + if (c.id !== 'rowNumber') { + p[c.field] = { displayValue: 'NULL', ariaLabel: 'NULL', isNull: true }; + } return p; }, {})); }