-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
any-one-all-ofRelated to fixing anyOf, oneOf or allOfRelated to fixing anyOf, oneOf or allOfawaiting responsebugperformance
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?
core
Version
5.1.0
Current Behavior
I'm passing in a JSF with a large number of "OneOf" options - specifically two fields, one with 178 options, the other field with 260 options.
The form renders and behaves as expected when running the site locally.
When deployed to a production environment, it fails to work as expected. The form is rendered and the dropdowns functional, but validation for the whole form fails to occur. No error is logged to the console, but by logging the "onChange" event, I can see the message "Maximum call stack size exceeded" in multiple locations. As validation does not occur, the submit button does not become enabled.
Input Schema:
{
"type": "object",
"properties": {
"productCode": {
"title": "Product Code (3 chars)",
"type": "string",
"minLength": 3,
"maxLength": 3
},
"country": {
"title": "Country",
"type": "string",
"oneOf": [
{
"const": "2",
"title": "Afghanistan"
},
{
"const": "15",
"title": "Åland Islands"
}
// .. Cut for conciseness. 260 objects total
]
},
"currency": {
"title": "Billing Currency Assignment",
"type": "string",
"oneOf": [
{
"const": "-1",
"title": "???"
},
{
"const": "158",
"title": "AED"
}
// .. Cut for conciseness. 178 objects total
]
}
},
"required": [
"productCode",
"country",
"currency"
]
}
Output of the change event errors:
errors: [
{
"stack": "Maximum call stack size exceeded"
}
]
Expected Behavior
Expect the form with validation work as expected in a production environment.
Steps To Reproduce
- Create a Form component, passing in the above form schema with the stated number of "OneOf" options.
- Observe that in a local dev environment, the form works as expected.
- Deploy to a production environment and observe that the form fails to validate
Environment
- OS: Windows 11
- Node: 16.7.1
- npm: 8.15.0
Tested on multiple browsers - Edge, Chrome and Firefox, all show the same behaviour.
Anything else?
Metadata
Metadata
Assignees
Labels
any-one-all-ofRelated to fixing anyOf, oneOf or allOfRelated to fixing anyOf, oneOf or allOfawaiting responsebugperformance