Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

364
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda