fix: display CodeLookup values instead of IDs in datatable view (#2896)
Added empty check: parts[1] && parts[1].trim() to ensure the part after _cd_ exists and is not empty (line)
This commit is contained in:
+5
@@ -235,6 +235,11 @@ export class DatatableMultiRowComponent implements OnInit, OnDestroy, OnChanges
|
||||
if (typeof value === 'number') {
|
||||
value = this.numberFormat.transform(value);
|
||||
}
|
||||
} else if (columnDisplayType === 'CODELOOKUP') {
|
||||
if (columnHeader.columnValues && value !== null && value !== undefined) {
|
||||
const codeValue = columnHeader.columnValues.find((cv: any) => cv.id === value);
|
||||
value = codeValue ? codeValue.value : value;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user