Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autocomplete] multiselect label bug #10818

Closed
aepp opened this issue Mar 27, 2018 · 3 comments · Fixed by #17037
Closed

[Autocomplete] multiselect label bug #10818

aepp opened this issue Mar 27, 2018 · 3 comments · Fixed by #17037
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module!

Comments

@aepp
Copy link

aepp commented Mar 27, 2018

Label of Multiselect Autocomplete built with Downshift dosn't behave correctly

Expected Behavior

On focus label is shrunk, on blur not (if the field is empty)

Current Behavior

If label is used, it is shrunk initially. If set explicitly to shrik: false through props, then the label overlays the placeholder on focus. The issue occurs only on multiselect autocomplete.

Steps to Reproduce (for bugs)

I used the demo from v1 add added a label: https://codesandbox.io/s/x959lm916z Just click on the second autocomplete.

@oliviertassinari oliviertassinari self-assigned this Apr 1, 2018
@oliviertassinari
Copy link
Member

The issue occurs only on multiselect autocomplete.

@aepp The root of this behavior comes from these lines:
https://github.com/mui-org/material-ui/blob/d2f1bda01645716d2f0452dda383ce52f46f8d9c/src/Form/FormControl.js#L62-L64

We have made a tradeoff by only running the logic at the component initialization and by shrinking the label as soon as the startAdornment property is used.

@oliviertassinari
Copy link
Member

I doubt it's will ever be important enough to worth complexifying the implementation on our side. So I'm suggesting we label this issue "won't fix".

@oliviertassinari oliviertassinari self-assigned this Apr 3, 2018
@aepp
Copy link
Author

aepp commented Apr 4, 2018

Oh ok, thank you for lettin' me know. So there is also no possibility to override this behavior from "outside", right?

@oliviertassinari oliviertassinari removed their assignment Apr 21, 2018
@oliviertassinari oliviertassinari self-assigned this Sep 17, 2019
@oliviertassinari oliviertassinari added the component: autocomplete This is the name of the generic UI component, not the React module! label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants