@coolon/angular-ui-powerups 14.14.2 → 14.15.0

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.
@@ -4529,10 +4529,14 @@ class TreeLabelColumnModel extends ColumnModel {
4529
4529
  constructor(columnId, textPropertiesProvider, expansionModel) {
4530
4530
  super(columnId, textPropertiesProvider);
4531
4531
  this.expansionModel = expansionModel;
4532
+ this.labelFactory = () => undefined;
4532
4533
  this.cellRenderer(TreeLabelCellRendererComponent);
4533
4534
  }
4534
4535
  pluck(property) {
4535
- this.labelProperty = property;
4536
+ this.useLabel(row => row[property]);
4537
+ }
4538
+ useLabel(factory) {
4539
+ this.labelFactory = factory;
4536
4540
  }
4537
4541
  /**
4538
4542
  * @deprecated use #useIcon instead.
@@ -4550,7 +4554,7 @@ class TreeLabelColumnModel extends ColumnModel {
4550
4554
  component.treeTableModel = this.expansionModel;
4551
4555
  }
4552
4556
  component.value = rowData.row;
4553
- component.label = isNil(this.labelProperty) ? undefined : rowData.row[this.labelProperty];
4557
+ component.label = this.labelFactory(rowData.row);
4554
4558
  component.iconFactory = this.iconFactory;
4555
4559
  }));
4556
4560
  return this;