{"action":"opened","issue":{"url":"https://api.github.com/repos/callemall/material-ui/issues/6041","repository_url":"https://api.github.com/repos/callemall/material-ui","labels_url":"https://api.github.com/repos/callemall/material-ui/issues/6041/labels{/name}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/6041/comments","events_url":"https://api.github.com/repos/callemall/material-ui/issues/6041/events","html_url":"https://github.com/callemall/material-ui/issues/6041","id":204168254,"number":6041,"title":"Wrap MenuItem as a higher order component","user":{"login":"ralphsmith80","id":1655592,"avatar_url":"https://avatars.githubusercontent.com/u/1655592?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphsmith80","html_url":"https://github.com/ralphsmith80","followers_url":"https://api.github.com/users/ralphsmith80/followers","following_url":"https://api.github.com/users/ralphsmith80/following{/other_user}","gists_url":"https://api.github.com/users/ralphsmith80/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphsmith80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphsmith80/subscriptions","organizations_url":"https://api.github.com/users/ralphsmith80/orgs","repos_url":"https://api.github.com/users/ralphsmith80/repos","events_url":"https://api.github.com/users/ralphsmith80/events{/privacy}","received_events_url":"https://api.github.com/users/ralphsmith80/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-31T00:07:47Z","updated_at":"2017-01-31T00:07:47Z","closed_at":null,"body":"### Description\r\nThe MenuItem component does not work as expected when you wrap it with a higher order component. \r\n\r\nThis looks like a regression between `0.16.5` and `0.16.7`.\r\n\r\n### Problem description\r\nI've been using a higher order components to wrap Material UI components so that we can have a single area for defined default props across a team.\r\n\r\nI've recently updated from `0.16.5` to `0.16.7` to get the custom step connector. My `SelectField`s that contain `MenuItem`s are now broken.\r\n\r\nHere's the code I'm using to create a higher order `MenuItem` with some `defaultProps`. \r\n\r\n```\r\nimport React, {Component} from 'react'\r\nimport MenuItemMUI from 'material-ui/MenuItem'\r\n\r\nclass MenuItem extends Component {\r\n  render() {\r\n    return (\r\n      <MenuItemMUI {...this.props} />\r\n    )\r\n  }\r\n}\r\n\r\nMenuItem.defaultProps = {\r\n  className: 'menu-item',\r\n}\r\n\r\nexport default MenuItem\r\n```\r\n\r\n\r\n\r\n### Link to minimally-working code that reproduces the issue\r\nHere's a codepen with a working example of what I'm doing. I'm pointing to a cdn that I don't own so I'm not sure of the Material UI version, but it's an older version that works as expected in this case.\r\nhttps://codepen.io/ralphsmith80/pen/XpVGoe\r\n\r\n### Versions\r\n\r\n- Material-UI:\r\n`0.16.7`\r\n- React:\r\n`15.4.1`\r\n- Browser:\r\nChrome Version 55.0.2883.95 (64-bit)\r\n"}}
{"actor":{"display_login":"ralphsmith80"}}