rjsf-team/react-jsonschema-form

Incorrect Casing of Widget Props Causes Errors

クローズ

#4,407 opened on 2024/12/02

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (2,136 件のフォーク)batch import
bughelp wanted

Repository metrics

Stars
 (13,175 個のスター)
PR merge metrics
 (平均マージ 3d 17h) (30d で 32 merged PRs)

説明

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

コントリビューターガイド