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
This commit is contained in:
Alex Ma
2020-01-09 10:23:11 -08:00
committed by GitHub
parent 206738db63
commit c161f8d8ad

View File

@@ -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;
}, {}));
}