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

358
Views
How to properly align InputLabel in Material UI?

enter image description here

This is my code and this is how the InputLabel is being placed. How do I style it to make it look better. Here is my code :

<FormControl fullWidth>
        <InputLabel >Select EPE</InputLabel>
        <Select
            labelId="select-EPE"
            id="select-EPE"
            label="EPE"
            
            onChange={(event)=>{
                setEPE_Record_Name(event.target.value);
                EPE_Data.name = event.target.value
            }}
        >

        {response ? response.map((item)=>{
            return (<MenuItem value = {item.Name}>  {item.Name} </MenuItem>);
        } ) : null}
        
        </Select>
        
        </FormControl>

Also when I select an option it overlaps with the label. enter image description here

The response part only checks and creates a dropdown option for every existing value in response array.

{response ? response.map((item)=>{
        return (<MenuItem value = {item.Name}>  {item.Name} </MenuItem>);
    } ) : null}

How do I fix the label properly?

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

0

for anyone curious, I solved the issue by changing this one part of the code. Use Textfield instead of Select.

<FormControl fullWidth>
        
        <TextField 
        select 
        variant={"outlined"} 
        label="Select EPE"
        onChange={(event)=>{
            setEPE_Record_Name(event.target.value);
            EPE_Data.name = event.target.value
        }}
        >

        {response ? response.map((item)=>{
            return (<MenuItem value = {item.Name}>  {item.Name} </MenuItem>);
        } ) : null}
        
        </TextField>
        
        </FormControl>
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!