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

Invalid prop children of type array supplied to Popover #2472

Closed
davidlashlee opened this issue Dec 10, 2015 · 4 comments · Fixed by #2477
Closed

Invalid prop children of type array supplied to Popover #2472

davidlashlee opened this issue Dec 10, 2015 · 4 comments · Fixed by #2477
Labels
component: Popover The React component.

Comments

@davidlashlee
Copy link

when passing in an array of jsx components into Popover, I get a warning saying its an invalid prop type.

<Popover> {arrayOfJSXComponents} </Popover>

Warning: Failed propType: Invalid prop childrenof typearraysupplied toPopover, expected object. Check the render method of Toolbar``

Still seems to work just fine though, I'm assuming proptypes for Popover only allows object and not object or array?

Is this intentional and I'm misusing the component?

Thanks,

@alitaheri
Copy link
Member

@davidlashlee Popover should have a root element. wrap them around a div and try again.

@oliviertassinari
Copy link
Member

I think that we should have node here https://github.com/callemall/material-ui/blob/master/src/popover/popover.jsx#L27.

@alitaheri
Copy link
Member

@oliviertassinari Yup

@alitaheri
Copy link
Member

@davidlashlee Thanks for reporting this.

@zannager zannager added the component: Popover The React component. label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Popover The React component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants