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

[Select] multi label stays active when value is empty #8965

Closed
sakulstra opened this issue Nov 2, 2017 · 1 comment
Closed

[Select] multi label stays active when value is empty #8965

sakulstra opened this issue Nov 2, 2017 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@sakulstra
Copy link
Contributor

Expected Behavior

When clearing a multiselect the label should get inactive again and the formcontrol should lose dirty state again.

Current Behavior

The label stays active.

Reproduction

Select an item in current multiselect docs and then deselect it again - the label will stay active.
gifcast_171102180119

I can fix it locally by adding

    this.checkDirty(nextProps);

to https://github.com/callemall/material-ui/blob/v1-beta/src/Input/Input.js#L377 but I don't understand why componentWillUpdate doesn't fire when items get unselected :/

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Nov 2, 2017
@oliviertassinari
Copy link
Member

The root of the issue is in #5186 where the focus, hover and selected state have the same UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants