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

190
Views
Material-ui Select component not update state correctly

I made multiple select input with Material-UI. By default state have an array of two objects. I set this state as select value, so it should show default objects as selected. But problem is, that this not working, even when I try to select others items select updates this state but I can't to deselect default values. I placed my code on CodeSandbox

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The default values you created are separate than the values in vesselsList. If you change your default state to this it works.

const [desiredVesselType, setDesiredVesselType] = useState([
    vesselsList[3],
    vesselsList[4]
  ]);

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!