-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[ListItem] allow ListItem to be selected like MenuItem #8667
Comments
@phiilu I don't know what to think about this one. I can't see what would be the default list item selected style nor why it should be the same of the menu item. I couldn't find any example of this in Polymer side https://www.webcomponents.org/element/PolymerElements/iron-list In the uncertainty, I'm closing. We have been using some custom style on the documentation website. (the active page is bold). Thanks for raising this point. I want to collect more feedback before doing anything. |
I agree with @phiilu. It'd be nice to have "selected" prop on ListItem. But if you don't think it's a good idea, could someone work on a "Selectable list" implementation like in the previous version (http://www.material-ui.com/#/components/list) I've tried to implement using List+menuItem but when I click outside from the List, it lost the selection (it makes sense for a menuItem) *I'm working on something similar to this example: https://material.io/guidelines/layout/structure.html#structure-side-nav |
Hi everyone, agree with @phiilu too. As a beginner user on material ui, I'm searching how to display a ListItem component easily selected from the responsive demo drawer. |
Try to use the overriding-with-classes for the customization. |
Upvote! |
Upvote! |
I was wondering, if it would be better if we move the
selected
prop from theMenuItem
directly to theListItem
.I was using the
Drawer
component and I wanted to show the user whichListItem
was active in theDrawer
. So I thought I make itselected
, but than I realized the ListItem has noselected
prop, but I remebered that theMenuItem
has this prop. I looked into the code and saw that theMenuItem
is basicly aListItem
.If we do not think this is a good idea, we should at least tell the user in the docs, when he wants to make a
ListItem
selected
he should use aMenuItem
instead.Your Environment
The text was updated successfully, but these errors were encountered: