italoiz / unform-community-packages

MIT License
61 stars 10 forks source link

InputLabel not shrinking when onFocus #26

Closed vanialadev closed 4 years ago

vanialadev commented 4 years ago

image

The of the component is not shrinking when the component onFocus.

InputLabelProps={{ shrink: true, }} dont work

italoiz commented 4 years ago

Hi, @vanialadev can you provide an example and what the version of the library are you using?

vanialadev commented 4 years ago
<Grid item lg={3} sm={6} xl={3} xs={12}>
  <TextField
    label="Nome"
    name="nome"
    variant="outlined"
    type="text"
    error
    InputLabelProps={{
      shrink: true,
    }}
  />
</Grid>
<Grid item lg={3} sm={6} xl={3} xs={12}>
  <TextField
    label="CPF"
    name="cpf"
    variant="outlined"
    type="text"
    error
    placeholder="CPFF"
    InputLabelProps={{
      shrink: true,
    }}
  />
</Grid>

image The label should`ve appear at the top because I forced it up at the code, but it doesn't happen

image The label was supposed to go to the top when I click at the box, but it only goes up when I start to type image

version: "unform-material-ui": "^1.0.1",

eliton-algoll commented 4 years ago

I also have this problem, any solution?

italoiz commented 4 years ago

@eliton-algoll Yes, I resolved this problem, but I doing tests to ensure the quality of code. I will send a new version in this week :wink: