rjsf-team/react-jsonschema-form

Incorrect Casing of Widget Props Causes Errors

已关闭

#4,407 创建于 2024年12月2日

 (2 条评论) (0 个反应) (0 位负责人)TypeScript (2,136 个派生)batch import
bughelp wanted

仓库指标

星标
 (13,175 个星标)
PR 合并指标
 (平均合并 3天 17小时) (30 天内合并 32 个 PR)

描述

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

贡献者指南