Skip to content

Commit ce52d9e

Browse files
authored
Merge pull request #126 from forms-angular/hidden-fields
provide support for hiding entire nested schemas
2 parents 0a87ef3 + 5ef3a6c commit ce52d9e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/server/data_form.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,12 @@ export class FormsAngular {
579579
if (paths[element].options.form) {
580580
outPath[element].options = {form: extend(true, {}, paths[element].options.form)};
581581
}
582+
// this provides support for entire nested schemas that wish to remain hidden
583+
if (paths[element].options.secure) {
584+
hiddenFields.push(element);
585+
}
586+
// to support hiding individual properties of nested schema would require us
587+
// to do something with subSchemaInfo.hide here
582588
} else {
583589
// check for arrays
584590
let realType = paths[element].caster ? paths[element].caster : paths[element];

0 commit comments

Comments
 (0)