-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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] how to support SubItem #1105
Comments
Or we can simply use context to give the nested level to childrens. It seems cleaner but it has the drawback that context are going to change in React, but I guess we will be able to adapt so it should not be an issue. |
Does this break nested ListItem's ? I am trying to use the basic example from the docs page and am getting this error: Uncaught Error: Invariant Violation: ReactMount: Two valid but unequal nodes with the same I'm not even adding anything special to it. Just the straight up example from the docs. What am I missing here? |
It looks like The down side to this is that it's having to traverse all of the children and pick out ListItems as you've mentioned @cgestes. Also, this a performance problem since it will have to look at all children in order to know if there are any nested list items. I propose that we create a new prop called
What do you guys think? @oliviertassinari @jkruder @cgestes |
@hai-cea This was how the initial nested list items was done, passed as props. We could use a property to indicate that it has children and then we can wrap all children in a |
Sorry on hollidays. What do you think about using context instead of nestedItem to propagate On Tue, Aug 18, 2015, 00:54 Hai Nguyen notifications@github.com wrote:
|
Follow up of the discussion here: https://github.com/callemall/material-ui/pull/1096/files#r34335985
How can we distinguish between SubItem and child in ListItem?
The current issue is the following:
How can we know that FooItem is a subitem?
I see multiples solutions:
I see special case where ones would want a child with a List.
What do you think?
The text was updated successfully, but these errors were encountered: