react-jsonschema-form
react-jsonschema-form copied to clipboard
Warning: React does not recognize the `errorSchema` and Invalid DOM property `autocomplete`.
Prerequisites
- [X] I have searched the existing issues
- [X] I understand that providing a SSCCE example is tremendously useful to the maintainers.
- [X] 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.17.1
Current Behavior
Warning: React does not recognize the 'errorSchema' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase 'errorschema' instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Warning: Invalid DOM property 'autocomplete'. Did you mean 'autoComplete'?
I am getting these warnings when using Form imported from "@rjsf/mui" when having anyOf or oneOf with type object
Sample Schema
SomeSchema:
type: object
properties:
someProp:
type: object
anyOf:
- properties:
a:
type: string
- properties:
b:
type: string
Expected Behavior
No warnings, like using Normal Form from "@rjsf/core"
Steps To Reproduce
import Form from "@rjsf/mui"
<Form
validator={validator}
schema={{
"title": "Location",
"type": "object",
"additionalProperties": true,
"anyOf": [
{
"title": "City",
"properties": {
"city": {
"type": "string"
}
},
},
{
"title": "Coordinates",
"properties": {
"lat": {
"type": "number"
},
"lon": {
"type": "number"
}
},
}
]
}}
/>
Environment
- OS:
- Node:
- npm:
Anything else?
Ah, we are spreading in the @rjsf/mui theme, and clearly we aren't removing those two properly. I'll push a fix and soon.
Facing exactly same issue with version 5.19.4. Seems bug was fixed in 5.18.0?
Warning: React does not recognize the `errorSchema` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `errorschema` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\
Warning: Invalid DOM property `autocomplete`. Did you mean `autoComplete`?
@thaikoh Can you provide an example using the a shared playground link that highlights this. Thanks!