@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.
@@ -7277,7 +7277,9 @@ var entity_form_builder_EntityEditFormBuilder = /** @class */ (function () {
7277
7277
  var lookupEntity = this.context.getMetaData().getRootEntity()
7278
7278
  .subEntities.filter(function (ent) { return ent.id == attr.lookupEntity; })[0];
7279
7279
  var dataAttr = this.context.getMetaData().getAttributeById(attr.dataAttr);
7280
- readOnly = readOnly && dataAttr.isEditable;
7280
+ if (!dataAttr)
7281
+ return;
7282
+ readOnly = readOnly || !dataAttr.isEditable;
7281
7283
  value = this.params.values
7282
7284
  ? this.params.values.getValue(dataAttr.id)
7283
7285
  : undefined;
@@ -7668,15 +7670,10 @@ var entity_form_builder_EntityEditFormBuilder = /** @class */ (function () {
7668
7670
  this.form['setHtmlInt'](formHtml);
7669
7671
  for (var _i = 0, _a = this.context.getActiveEntity().attributes; _i < _a.length; _i++) {
7670
7672
  var attr = _a[_i];
7671
- if (!attr.isPrimaryKey) {
7672
- if (this.params.isEditForm) {
7673
- if (!attr.showOnEdit)
7674
- continue;
7675
- }
7676
- else {
7677
- if (!attr.showOnCreate)
7678
- continue;
7679
- }
7673
+ if (!this.params.isEditForm && !attr.showOnCreate)
7674
+ continue;
7675
+ if (!attr.isPrimaryKey && this.params.isEditForm && !attr.showOnEdit) {
7676
+ continue;
7680
7677
  }
7681
7678
  this.addFormField(fb.toDOM(), attr);
7682
7679
  }