@easydata/crud 1.4.1-rc01 → 1.4.1-rc02

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.
@@ -11706,7 +11706,9 @@ var entity_form_builder_EntityEditFormBuilder = /** @class */ (function () {
11706
11706
  var lookupEntity = this.context.getMetaData().getRootEntity()
11707
11707
  .subEntities.filter(function (ent) { return ent.id == attr.lookupEntity; })[0];
11708
11708
  var dataAttr = this.context.getMetaData().getAttributeById(attr.dataAttr);
11709
- readOnly = readOnly && dataAttr.isEditable;
11709
+ if (!dataAttr)
11710
+ return;
11711
+ readOnly = readOnly || !dataAttr.isEditable;
11710
11712
  value = this.params.values
11711
11713
  ? this.params.values.getValue(dataAttr.id)
11712
11714
  : undefined;
@@ -12097,15 +12099,10 @@ var entity_form_builder_EntityEditFormBuilder = /** @class */ (function () {
12097
12099
  this.form['setHtmlInt'](formHtml);
12098
12100
  for (var _i = 0, _a = this.context.getActiveEntity().attributes; _i < _a.length; _i++) {
12099
12101
  var attr = _a[_i];
12100
- if (!attr.isPrimaryKey) {
12101
- if (this.params.isEditForm) {
12102
- if (!attr.showOnEdit)
12103
- continue;
12104
- }
12105
- else {
12106
- if (!attr.showOnCreate)
12107
- continue;
12108
- }
12102
+ if (!this.params.isEditForm && !attr.showOnCreate)
12103
+ continue;
12104
+ if (!attr.isPrimaryKey && this.params.isEditForm && !attr.showOnEdit) {
12105
+ continue;
12109
12106
  }
12110
12107
  this.addFormField(fb.toDOM(), attr);
12111
12108
  }