@sumaris-net/ngx-components 2.5.6 → 2.5.7-rc2

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.
@@ -26305,7 +26305,7 @@ class AppPropertiesTable extends AppInMemoryTable {
26305
26305
  // translate definition label
26306
26306
  definition: this.toTranslatedFormFieldDefinition(definition),
26307
26307
  // get user value or default value
26308
- value: source.find(p => p.id === definition.key)?.value || definition.defaultValue
26308
+ value: this.toValue(source, definition)
26309
26309
  })));
26310
26310
  super.setValue(target, opts);
26311
26311
  }
@@ -26362,6 +26362,10 @@ class AppPropertiesTable extends AppInMemoryTable {
26362
26362
  row.validator.patchValue({ value: row.currentData.definition.defaultValue });
26363
26363
  this.markRowAsDirty();
26364
26364
  }
26365
+ toValue(values, definition) {
26366
+ const value = values.find(v => v.id === definition.key)?.value;
26367
+ return isNotNil(value) ? value : definition.defaultValue;
26368
+ }
26365
26369
  }
26366
26370
  AppPropertiesTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AppPropertiesTable, deps: [{ token: i0.Injector }, { token: i1$3.UntypedFormBuilder }, { token: PropertyEntityValidator }, { token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Component });
26367
26371
  AppPropertiesTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AppPropertiesTable, selector: "app-properties-table", inputs: { definitions: "definitions", showToolbar: "showToolbar" }, providers: [