eclipsesource / eclipsesource/jsonforms
Required property is not set if field is conditionally required
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 424
- Avg merge
- 17d 8h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
When making the specific field required based on some condition the required property is still false.
**To Reproduce**
Steps to reproduce the behavior:
1. Schema contains something conditional
`{
type: "object",
properties: {
b: {
type: "boolean"
},
c: {
type: "string",
minLength: 1
}
},
if: {
properties: {
b: { enum: [false] }
}
},
then: {
required: ["c"]
}
}`
2. When making the "b" from true to false (for example checking and unchecking the box), required property of ''c'' which has the renderer of MaterialInputControl will not be changed and will remain false.
**Expected behavior**
After a conditional action the required property of MaterialInputControl to become true.
**Browser (please complete the following information):**
- Chrome 74.0.3729.157 (Official Build) (64-bit)
- Firefox 66.0.5 (64-bit)
**Used Setup (please complete the following information):**
- react
- material
Contributor guide
Assessment
This issue has not been assessed yet.