@coolon/angular-ui-powerups 2.0.0-alpha.11 → 2.0.0-alpha.12

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.
@@ -1644,12 +1644,22 @@ class CustomValueColumnModel extends ColumnModel {
1644
1644
  this.getValue = getValue;
1645
1645
  this.cellRenderer(DefaultCellRendererComponent);
1646
1646
  }
1647
- cellRenderer(componentType, onComponentInit) {
1647
+ cellRenderer(componentType, onComponentInitOrOptions) {
1648
1648
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
1649
- if (firstTime && ___default.isFunction(onComponentInit)) {
1650
- onComponentInit(component);
1649
+ if (firstTime) {
1650
+ if (___default.isFunction(onComponentInitOrOptions)) {
1651
+ onComponentInitOrOptions(component);
1652
+ }
1653
+ else {
1654
+ if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
1655
+ onComponentInitOrOptions.onComponentInit(component);
1656
+ }
1657
+ }
1651
1658
  }
1652
1659
  component.value = this.getValue(rowData.row);
1660
+ if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
1661
+ onComponentInitOrOptions.onRowUpdate(component, rowData.row);
1662
+ }
1653
1663
  }));
1654
1664
  return this;
1655
1665
  }
@@ -1858,8 +1868,8 @@ let TableModel = TableModel_1 = class TableModel {
1858
1868
  addCustomColumn(columnId, dataAccessor) {
1859
1869
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
1860
1870
  }
1861
- addComponentColumn(columnId, component, onInit) {
1862
- return this.addColumn(new CustomValueColumnModel(columnId, this, row => row)).cellRenderer(component, onInit);
1871
+ addComponentColumn(columnId, component, onComponentInitOrOptions) {
1872
+ return this.addColumn(new CustomValueColumnModel(columnId, this, row => row)).cellRenderer(component, onComponentInitOrOptions);
1863
1873
  }
1864
1874
  addTemplateColumn(columnId) {
1865
1875
  return this.addColumn(new CustomTemplateColumnModel(columnId, this));