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

397
Vistas
npm @material-ui/core Button and TexField not working

I am building a React application and I wanted to use the material-ui framework.

I build a component with a textfield and a button but I can`t click the textfield neither the button their blocked.

Here is the component code:

import React, { Component } from 'react';
import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField';


class Descarcare extends React.Component {
constructor(props) {
  super(props);
  this.state = {  };
 
}



render() {
   return(
<div>
<h1>Descarcare</h1>

<TextField id="standard-required" label="ID" InputProps={{
        readOnly: false,
      }}/>
<Button variant="contained" color="primary">
Trimite
</Button>
</div>
   );
}

 }

export default Descarcare;

The component appears in the browser but I can`t press the button it is blocked and so is the input field. I can not write anything in it. Can please someone help me ? Thanks in advance

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

0

You have to provide the onClick and onChange functions respectively.

about 4 years ago · Juan Pablo Isaza Denunciar

0

It might be related to your other configs, You could have a reference to this example:

Edit Material demo (forked)

about 4 years ago · Juan Pablo Isaza Denunciar

0

In React you got to control inputs see here as for the material-ui library buttons default to disable if no onClick is provided (if I recall correctly) and text fields need value and onChange to react! hope it is helpfull

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