Skip to content

Incorrect Casing of Widget Props Causes Errors #4407

@aress31

Description

@aress31

Prerequisites

What theme are you using?

mui

Version

5.23.1

Current Behavior

The properties passed down to customer widget/fields have the wrong casing causing both lighthouse errors and them not being applied, see:

const createFields = () => ({
  ArrayField: AutocompleteArrayField,
});

const AutocompleteArrayField = ({
  formData,
  schema: { title },
  onChange,
  ...props
}) => {
  const handleChange = (event, newValue) => onChange(newValue);

  return (
    <Autocomplete
      freeSolo
      multiple
      options={[]}
      value={formData}
      onChange={handleChange}
      renderInput={(params) => <TextField {...params} label={title} />}
      {...props}
    />
  );
};

image

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:
- Node:
- npm:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions