Skip to content

Warning: React does not recognize the errorSchema and Invalid DOM property autocomplete. #4134

@brianlaw033

Description

@brianlaw033

Prerequisites

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?

Screenshot 2024-03-18 at 17 43 46 Screenshot 2024-03-18 at 17 43 30

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmaterial-uimaterial-ui related theme issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions