-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #480 from Saeleas/master
Fixing issue when using visibleIf in array items.
- Loading branch information
Showing
5 changed files
with
118 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/app/json-schema-example/visibility-binding-example-schema4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"type": "object", | ||
"title": "Example of visibleIf inside of an array item", | ||
"description": "This example shows how to use visibility options inside of items of an array", | ||
"properties": { | ||
"arrayObject": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"title": "Object with visibleIf properties.", | ||
"properties": { | ||
"showHiddenField": { | ||
"type": "integer", | ||
"widget": "select", | ||
"title": "Choose 1 to show the hidden field or 0 to hide it. By default the field is hidden.", | ||
"oneOf": [ | ||
{ | ||
"enum": [0], | ||
"description": "Hide field." | ||
}, | ||
{ | ||
"enum": [1], | ||
"description": "Show hidden field." | ||
} | ||
] | ||
}, | ||
"visibleTest": { | ||
"type": "string", | ||
"title": "This is shown if previous field is 1.", | ||
"visibleIf": { | ||
"showHiddenField": [1] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"arrayObject" | ||
] | ||
} |