ng-firebase-table-kxp 1.0.5 → 1.0.6

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.
@@ -1109,16 +1109,12 @@ class TableComponent {
1109
1109
  }
1110
1110
  getDisplayValue(col, row, withinLimit = false) {
1111
1111
  let value;
1112
- if (row[col.property] === null || row[col.property] === undefined) {
1113
- return '';
1114
- }
1115
1112
  if (col.calculateValue) {
1116
- value = String(col.calculateValue(row));
1113
+ value = col.calculateValue(row);
1117
1114
  }
1118
1115
  else {
1119
1116
  value = this.getNestedValue(row, col.property);
1120
1117
  }
1121
- // Verifica se é um array e tem arrayField definido
1122
1118
  if (Array.isArray(value) && col.arrayField) {
1123
1119
  value = this.formatArrayValue(value, col.arrayField);
1124
1120
  }
@@ -1126,7 +1122,19 @@ class TableComponent {
1126
1122
  value = row[col.property];
1127
1123
  }
1128
1124
  value = col.pipe ? col.pipe.transform(value) : value;
1129
- return withinLimit ? value : value.substring(0, col.charLimit) + '...';
1125
+ if (value === null || value === undefined) {
1126
+ value = '';
1127
+ }
1128
+ else {
1129
+ value = String(value);
1130
+ }
1131
+ if (typeof value !== 'string') {
1132
+ value = '';
1133
+ }
1134
+ if (withinLimit || !col.charLimit) {
1135
+ return value;
1136
+ }
1137
+ return value.substring(0, col.charLimit) + '...';
1130
1138
  }
1131
1139
  getNestedValue(obj, path) {
1132
1140
  if (!path)