React 无法识别 DOM 元素上的 `InputProps` 属性

Müm*_*HİR 3 javascript reactjs material-ui

错误堆栈跟踪屏幕截图

警告:React 无法识别InputPropsDOM 元素上的 prop。如果您有意希望它作为自定义属性出现在 DOM 中,请将其拼写为小写inputprops。如果您不小心从父组件传递了它,请将其从 DOM 元素中删除。

我不明白我做错了什么。我见过很多类似的问题。但我找不到合适的解决方案。

<TextField
  {...input}
  {...rest}
  name={input.name}
  inputRef={inputRef}
  autoFocus={inputRef.current === document.activeElement}
  disabled={disabled || false}
  multiline={rowCount ? true : false}
  style={{
    width: "100%",
  }}
  onChange={(event) => {
    input.onChange(event.target.value);
  }}
  {...(hesapla
    ? {
        onBlur: (e) => {
          hesapla({ name: input.name, value: input.value });
        },
        onKeyDown: (e) => {
          if (e.key === "Enter") {
            hesapla({ name: input.name, value: input.value });
            e.preventDefault();
          }
        },
      }
    : {})}
  InputProps={{
    classes,
    ...(inputComponent ? { inputComponent: inputComponent } : {}),
    ...(endAdornment ? { endAdornment: endAdornment } : {}),
  }}
  inputProps={{
    style: {
      maxHeight: (rowCount * 16).toString() + "px",
      overflow: "auto",
      ...(rightJustify ? { textAlign: "end" } : {}),
      ...(!readOnly && hesapla
        ? { fontWeight: "bold", borderBottom: "2px solid" }
        : {}),
    },
    readOnly: readOnly ? readOnly : false,
  }}
></TextField>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

在此输入图像描述

Ama*_*Jha 5

问题是你正在使用inputProps而不是InputProps