-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugneeds triageInitial label given, to be assigned correct labels and assignedInitial label given, to be assigned correct labels and assigned
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
mui
Version
5.23.1
Current Behavior
You can see when this playground first loads that this field is visible
This should only be visible when the previous dropdown Please specify Affiliates has a value of Other which is in a nested "allOf"
field
"allOf": [
{
"if": {
"properties": {
"Is this request for an affiliate ?": {
"const": "true"
}
}
},
"then": {
"properties": {
"[\"Please specify Affiliates\"]": {
"title": "Please specify Affiliates",
"type": "string",
"enum": [
"Partner Solutions Inc",
"Cime",
"Royal Sun Alliance",
"Intact Public Entities",
"Coast",
"Intact Specialty Lines",
"On Side restoration",
"Other"
],
"default": "Cime"
}
},
"required": [
"[\"Please specify Affiliates\"]"
],
"allOf": [
{
"if": {
"properties": {
"[\"Please specify Affiliates\"]": {
"const": "Other"
}
}
},
"then": {
"properties": {
"[\"Please provide the other affiliate's company name\"]": {
"title": "Please provide the other affiliate's company name",
"type": "string",
"default": ""
}
},
"required": [
"[\"Please provide the other affiliate's company name\"]"
]
}
}
]
If I then select a value other than Other,
the input disappears unless I select Other
again, which is the correct behaviour. So, the problem is when the form first loads.
Hopefully, this video shows what I mean
aaaa.mp4
Do you know if this is a bug?
Expected Behavior
The if
condition in the nested allOf should not be met when the form first loads.
Steps To Reproduce
The Please provide the other affiliate's company name*
should not be visible when the form first loads in this playground
Environment
- OS:
- Node:
- npm:
Anything else?
No response
Metadata
Metadata
Assignees
Labels
bugneeds triageInitial label given, to be assigned correct labels and assignedInitial label given, to be assigned correct labels and assigned