@indigina/ui-kit 1.1.154 → 1.1.155

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8131,25 +8131,25 @@ class KitGridCellService {
8131
8131
  this.dateFormat = KIT_DATE_FORMAT;
8132
8132
  this.dateTimeFormat = KIT_DATETIME_FORMAT_LONG;
8133
8133
  }
8134
- createCellValue(columnType, columnField, dataItem, translationMap = {}) {
8134
+ createCellValue(columnType, columnField, dataItem, translationMap = {}, defaultValue = '') {
8135
8135
  let value = dataItem[columnField];
8136
8136
  if (!value) {
8137
8137
  value = this.getNestedGridCellValue(dataItem, columnField);
8138
8138
  }
8139
8139
  if (columnField in translationMap && value) {
8140
- return this.translateService.instant(translationMap[columnField](value));
8140
+ return this.translateService.instant(translationMap[columnField](value)) ?? defaultValue;
8141
8141
  }
8142
8142
  switch (columnType) {
8143
8143
  case 'number':
8144
- return this.decimalPipe.transform(value) ?? '';
8144
+ return this.decimalPipe.transform(value) ?? defaultValue;
8145
8145
  case 'date':
8146
- return this.datePipe.transform(value, this.dateFormat, 'UTC') ?? '';
8146
+ return this.datePipe.transform(value, this.dateFormat, 'UTC') ?? defaultValue;
8147
8147
  case 'dateTime':
8148
- return this.datePipe.transform(value, this.dateTimeFormat, 'UTC') ?? '';
8148
+ return this.datePipe.transform(value, this.dateTimeFormat, 'UTC') ?? defaultValue;
8149
8149
  case 'boolean':
8150
8150
  return this.translateService.instant(value ? 'common.yes' : 'common.no');
8151
8151
  default:
8152
- return value || '';
8152
+ return value || defaultValue;
8153
8153
  }
8154
8154
  }
8155
8155
  getNestedGridCellValue(dataItem, field) {