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

Make root dom element of <Inspector> not <li> #53

Open
ValentineStone opened this issue Apr 30, 2018 · 3 comments
Open

Make root dom element of <Inspector> not <li> #53

ValentineStone opened this issue Apr 30, 2018 · 3 comments

Comments

@ValentineStone
Copy link

ValentineStone commented Apr 30, 2018

<Inspector> component seems to be using <li> as a root dom node,
so when the inspector is nested in another list item component React complains with the flowing message:

Warning: validateDOMNesting(...): <li> cannot appear as a descendant of <li>

Below is the rendered dom tree which illustrates the problem:

image

Regardless of the React warning, according to MDN on <li> element:

Permitted parents: An <ul>, <ol>, or <menu> element.

So having <li> as root element is not a conforming usage anyhow ¯\_(ツ)_/¯

@ValentineStone ValentineStone changed the title Make root dom element of <Inspector> not a <li> Make root dom element of <Inspector> not <li> Apr 30, 2018
@xyc
Copy link
Collaborator

xyc commented May 4, 2018

Make sense, will change it to <ol> or <div>

@ndelangen
Copy link
Member

@ValentineStone if this has not been completed yet, it sounds like a pretty easy change. Would you like to help out, and build this feature?

@ValentineStone
Copy link
Author

@ndelangen sure, I'll take a look at it within a couple of days)

@xyc xyc mentioned this issue Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants