@stemy/ngx-dynamic-form 13.2.5 → 13.2.6

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.
@@ -672,16 +672,14 @@ class DynamicFormService extends DynamicFormService$1 {
672
672
  const controls = [];
673
673
  for (const p of keys) {
674
674
  const property = schema.properties[p];
675
- const fs = String(property.fieldSet || "");
676
- if (fs) {
677
- const fieldSet = fieldSets.find(fs => {
678
- return fs.id === p;
679
- });
680
- if (fieldSet) {
681
- fieldSet.fields.push(p);
675
+ const fsName = property.hidden ? null : String(property.fieldSet || "");
676
+ if (fsName) {
677
+ const fs = fieldSets.find(t => t.id === fsName);
678
+ if (fs) {
679
+ fs.fields.push(p);
682
680
  }
683
681
  else {
684
- fieldSets.push({ id: fs, legend: `legend.${fs}`, fields: [p] });
682
+ fieldSets.push({ id: fsName, legend: `legend.${fsName}`, fields: [p] });
685
683
  }
686
684
  }
687
685
  const models = await this.getFormControlModels(property, schema, customizeModels);