Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

786
Vistas
React does not recognize the `InputProps` prop on a DOM element

Error stacktrace screenshot

Warning: React does not recognize the InputProps prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase inputprops instead. If you accidentally passed it from a parent component, remove it from the DOM element.

I don't understand what I'm doing wrong. And I've seen many similar issues like this. But I couldn't see a proper solution.

<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>

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The problem is with your InputProps object, according to the documentation, it uses an object, you didn't pass a proper object to it.

So, if you want to realize this issue, I suggest you create your InputProps entry as a variable and log it:

const myInputPropsObject = {
    classes,
    ...(inputComponent ? { inputComponent: inputComponent } : {}),
    ...(endAdornment ? { endAdornment: endAdornment } : {}),
  }

console.log(myInputPropsObject)

Note: destruction of an empty object will cause the Uncaught SyntaxError: Invalid or unexpected token issue.

to check it:

const myObject = {
  name: 'testName',
  ...{},
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda