Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

385
Views
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 answers
Answer question

0

You have to provide the onClick and onChange functions respectively.

about 4 years ago · Juan Pablo Isaza Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!