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

[SelectField] Not accepting null in array #4825

Closed
BlockChange opened this issue Jul 25, 2016 · 0 comments
Closed

[SelectField] Not accepting null in array #4825

BlockChange opened this issue Jul 25, 2016 · 0 comments
Labels
component: select This is the name of the generic UI component, not the React module!

Comments

@BlockChange
Copy link

When I return null within a SelectField instead of a MenuItem (with a .map on an array) I get the infamous There is an internal error in the React performance measurement code. Did not expect componentDidUpdate timer to start while render timer is still in progress for another instance. error, but after that:

DropDownMenu.js:250 Uncaught TypeError: Cannot read property 'props' of null

I have to return an empty div to fix this.

And when I try to put the MenuItems in an array, I get (only when I open the menu):

warning.js:44 Warning: flattenChildren(...): Encountered two children with the same key, `1:$.$0`. Child keys must be unique; when two children share a key, only the first child will be used.
    in div (created by List)
    in List (created by Menu)
    in div (created by Menu)
    in ClickAwayListener (created by Menu)
    in Menu (created by DropDownMenu)
    in div (created by Paper)
    in Paper (created by PopoverAnimationVertical)
    in PopoverAnimationVertical
    in MuiThemeProvider

Even though I've keyed the children.

When I return a div instead of nothing or null then I get:

Unknown props `desktop`, `focusState` on <div> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
    in div (created by Menu)
    in div (created by List)
    in List (created by Menu)
    in div (created by Menu)
    in ClickAwayListener (created by Menu)
    in Menu (created by DropDownMenu)
    in div (created by Paper)
    in Paper (created by PopoverAnimationVertical)
    in PopoverAnimationVertical
    in MuiThemeProvider
@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@oliviertassinari oliviertassinari added the component: select This is the name of the generic UI component, not the React module! label Mar 26, 2017
@oliviertassinari oliviertassinari changed the title SelectField not accepting null in array [SelectField] Not accepting null in array Mar 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

2 participants