@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.
- package/esm2020/src/app/core/form/properties/properties.table.mjs +6 -2
- package/fesm2015/sumaris-net.ngx-components.mjs +12 -10
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +5 -1
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/properties/properties.table.d.ts +1 -0
|
@@ -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:
|
|
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: [
|