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:
Shubham Kumar
2025-12-13 16:25:49 -06:00
committed by GitHub
parent 4c00e5824d
commit e6bb867424
8 changed files with 95 additions and 13 deletions
@@ -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;
}