Skip to content

Commit 5f29f0f

Browse files
author
manasa
committed
default labels not displaying in embedded data issue fixed
1 parent ba3cd83 commit 5f29f0f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,15 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
337337
// from from the fieldDefs. This "name" is the value that
338338
// we'll share to connect things together in the table.
339339

340+
const labelsMap = this.fieldDefs.reduce((acc, curr) => {
341+
return { ...acc, [curr.name]: curr.label };
342+
}, {});
343+
340344
this.processedFields = [];
341345

342346
this.processedFields = resolvedFields.map((field, i) => {
343347
field.config.name = this.displayedColumns[i]; // .config["value"].replace(/ ./g,"_"); // replace space dot with underscore
348+
field.config.label = labelsMap[field.config.name] || field.config.label;
344349
return field;
345350
});
346351

0 commit comments

Comments
 (0)