@dflat-core/web 1.0.43 → 1.0.45

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.
@@ -75,16 +75,17 @@ class PresentationProfileTransformer {
75
75
  * Converts resolved PresentationProfileItem[] into ColumnDescriptor[] for the data grid.
76
76
  * Standard columns are matched from the backend descriptors by Property (ColumnKey);
77
77
  * custom-field columns get a synthetic text descriptor.
78
- * item.Label is the effective display label (custom override if set, natural label from catalog otherwise).
78
+ * item.Label is the custom override saved with the profile; it is null when the column keeps its
79
+ * natural label, which is then the backend descriptor's Name (the column key only as a last resort).
79
80
  */
80
81
  static buildDescriptors(items, backendDescriptors) {
81
82
  const byProperty = new Map(backendDescriptors.map(d => [d.Property, d]));
82
83
  return items
83
84
  .filter(i => !!i.ColumnKey)
84
85
  .map(i => {
85
- const displayLabel = i.Label ?? i.ColumnKey;
86
+ const template = byProperty.get(i.ColumnKey);
87
+ const displayLabel = i.Label || template?.Name || i.ColumnKey;
86
88
  if ((i.ColumnSourceType ?? 0) !== 2) {
87
- const template = byProperty.get(i.ColumnKey);
88
89
  if (!template)
89
90
  return null;
90
91
  return {