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

background-color of selected item is not changed at right timing when using Select with multiple #12960

Closed
2 tasks done
ryusaka opened this issue Sep 22, 2018 · 1 comment
Closed
2 tasks done
Labels
bug 🐛 Something doesn't work good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@ryusaka
Copy link
Contributor

ryusaka commented Sep 22, 2018

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

  • I think Select with multiple and button should change the background color when an item is selected.

Current Behavior

  • in mobile(width: xs), selected item is not changed immediately when selected. (now changed when next one is selected)

Steps to Reproduce

Link: https://material-ui.com/demos/selects/#multiple-select
Please see this using developer's tool with mobile mode.

Context

Your Environment

Tech Version
Material-UI v3.1.0
React v16.4.1
Browser Google Chrome 69
@ryusaka ryusaka changed the title background-color of selected item is not changed right timing when using Select with multiple background-color of selected item is not changed at right timing when using Select with multiple Sep 22, 2018
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Sep 23, 2018
@oliviertassinari
Copy link
Member

@ryusaka Thank you for reporting the issue! It's a regression introduced by #12602. The following diff fixes the problem.

    textAlign: 'left',
    paddingTop: 12,
    paddingBottom: 12,
-   '&$selected': {
+   '&$selected, &$selected:hover': {
      backgroundColor: theme.palette.action.selected,
    },
  },

https://github.com/mui-org/material-ui/blob/2802a1c9c39343e21f6e372c0cf255bc3b82b2f2/packages/material-ui/src/ListItem/ListItem.js#L18-L24

Do you want to work on it :)?

@oliviertassinari oliviertassinari added the good first issue Great for first contributions. Enable to learn the contribution process. label Sep 23, 2018
ryusaka added a commit to ryusaka/material-ui that referenced this issue Sep 23, 2018
marcelpanse pushed a commit to marcelpanse/material-ui that referenced this issue Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

No branches or pull requests

2 participants