@easydata/crud 1.4.1 → 1.4.2-rc01

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.
@@ -286,6 +286,7 @@ var meta_entity_MetaEntityAttr = /** @class */ (function () {
286
286
  this.lookupEntity = dto.lent;
287
287
  this.dataAttr = dto.dattr;
288
288
  this.lookupDataAttr = dto.ldattr;
289
+ this.defaultValue = dto.defVal;
289
290
  this.isNullable = utils["a" /* utils */].getIfDefined(dto.nul, this.isNullable);
290
291
  this.isEditable = utils["a" /* utils */].getIfDefined(dto.ied, this.isEditable);
291
292
  this.showOnView = utils["a" /* utils */].getIfDefined(dto.ivis || dto.sov, this.showOnView);
@@ -12003,9 +12004,11 @@ var entity_form_builder_EntityEditFormBuilder = /** @class */ (function () {
12003
12004
  });
12004
12005
  };
12005
12006
  EntityEditFormBuilder.prototype.addFormField = function (parent, attr) {
12006
- var value = this.params.values && attr.kind !== public_api["EntityAttrKind"].Lookup
12007
+ var value = (this.params.values && attr.kind !== public_api["EntityAttrKind"].Lookup)
12007
12008
  ? this.params.values.getValue(attr.id)
12008
- : undefined;
12009
+ : !this.params.isEditForm
12010
+ ? attr.defaultValue
12011
+ : undefined;
12009
12012
  var editor = this.resolveEditor(attr);
12010
12013
  var readOnly = this.params.isEditForm && (attr.isPrimaryKey || !attr.isEditable);
12011
12014
  var required = !attr.isNullable;