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

Error using ListItem #1112

Closed
ghost opened this issue Jul 10, 2015 · 6 comments
Closed

Error using ListItem #1112

ghost opened this issue Jul 10, 2015 · 6 comments
Labels
bug 🐛 Something doesn't work

Comments

@ghost
Copy link

ghost commented Jul 10, 2015

While using the new version of ListItem this bit of code resulted in the following error uncaught Error: Invariant Violation: ReactMount: Two valid but unequal nodes with the same data-reactid
Note that this ListItem itself was nested in other lists and cards. Funny thing is the same code worked with the earlier version of material-ui. Just wondering what changed and what I can do to fix this?

<div>
    <ListItem
        secondaryText = {<p> secondaryText </p>}
        disableTouchTap = {true}
        rightIconButton={options}
        style = {
            {
                fontSize : 16,
                lineHeight : "16px",
                backgroundColor : Colors.green50
            }
        }>
            <p>ABCD</p>
                <p>XYZ</p>
    </ListItem>
</div>
@cgestes
Copy link
Contributor

cgestes commented Jul 10, 2015

looks like a duplicated key somewhere.

If you remove one of the p it works again?

@jkruder
Copy link
Contributor

jkruder commented Jul 10, 2015

@vig9295 I just copied your code and dumped it into the list doc page and the only thing I had to do is remove the rightIconButton=... line because I don't know what options is. Can you provide the entire file? Or at least your render method? It could be something wrapping the <div> you provided.

@ghost
Copy link
Author

ghost commented Jul 10, 2015

I tried removing the rightIconButton and it doesnt work still. The moment I remove the ListItem and put in something else it starts to work. There's nothing wrapping the divs in this file. This structure fits into a Card which is inside a List. It doesnt work even when removing one of the p tags.

@brennanreese
Copy link

I also am having issues nesting list items under other list items. Even the basic example on the docs page doesn't work for me.

@alitaheri
Copy link
Member

@vig9295 Are you still experiencing this issue?

@alitaheri alitaheri added the bug 🐛 Something doesn't work label Dec 8, 2015
@alitaheri
Copy link
Member

I'm closing this, it seems to be abandoned. feel free to reopen if it persists 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

No branches or pull requests

4 participants