{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/9004","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/9004/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/9004/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/9004/events","html_url":"https://github.com/ant-design/ant-design/issues/9004","id":289397559,"node_id":"MDU6SXNzdWUyODkzOTc1NTk=","number":9004,"title":"Menu.Item should have the onClick param","user":{"login":"Martinnord","id":17549362,"node_id":"MDQ6VXNlcjE3NTQ5MzYy","avatar_url":"https://avatars3.githubusercontent.com/u/17549362?v=4","gravatar_id":"","url":"https://api.github.com/users/Martinnord","html_url":"https://github.com/Martinnord","followers_url":"https://api.github.com/users/Martinnord/followers","following_url":"https://api.github.com/users/Martinnord/following{/other_user}","gists_url":"https://api.github.com/users/Martinnord/gists{/gist_id}","starred_url":"https://api.github.com/users/Martinnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martinnord/subscriptions","organizations_url":"https://api.github.com/users/Martinnord/orgs","repos_url":"https://api.github.com/users/Martinnord/repos","events_url":"https://api.github.com/users/Martinnord/events{/privacy}","received_events_url":"https://api.github.com/users/Martinnord/received_events","type":"User","site_admin":false},"labels":[{"id":778618817,"node_id":"MDU6TGFiZWw3Nzg2MTg4MTc=","url":"https://api.github.com/repos/ant-design/ant-design/labels/Component:%20Menu","name":"Component: Menu","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":{"login":"valleykid","id":1892857,"node_id":"MDQ6VXNlcjE4OTI4NTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1892857?v=4","gravatar_id":"","url":"https://api.github.com/users/valleykid","html_url":"https://github.com/valleykid","followers_url":"https://api.github.com/users/valleykid/followers","following_url":"https://api.github.com/users/valleykid/following{/other_user}","gists_url":"https://api.github.com/users/valleykid/gists{/gist_id}","starred_url":"https://api.github.com/users/valleykid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valleykid/subscriptions","organizations_url":"https://api.github.com/users/valleykid/orgs","repos_url":"https://api.github.com/users/valleykid/repos","events_url":"https://api.github.com/users/valleykid/events{/privacy}","received_events_url":"https://api.github.com/users/valleykid/received_events","type":"User","site_admin":false},"assignees":[{"login":"valleykid","id":1892857,"node_id":"MDQ6VXNlcjE4OTI4NTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1892857?v=4","gravatar_id":"","url":"https://api.github.com/users/valleykid","html_url":"https://github.com/valleykid","followers_url":"https://api.github.com/users/valleykid/followers","following_url":"https://api.github.com/users/valleykid/following{/other_user}","gists_url":"https://api.github.com/users/valleykid/gists{/gist_id}","starred_url":"https://api.github.com/users/valleykid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valleykid/subscriptions","organizations_url":"https://api.github.com/users/valleykid/orgs","repos_url":"https://api.github.com/users/valleykid/repos","events_url":"https://api.github.com/users/valleykid/events{/privacy}","received_events_url":"https://api.github.com/users/valleykid/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-01-17T20:10:33Z","updated_at":"2018-06-05T02:14:16Z","closed_at":"2018-04-26T17:24:24Z","author_association":"NONE","body":"### What problem does this feature solve?\r\nI'd like to have a dropdown where one of the buttons is the logout button. When having a dropdown you can use `MenuItemGroup` and then populate it with X numbers of `Menu.Item`. At the moment `Menu.Item` doesn't support the onClick param so I can't attach a function to it. And I can't just add a `Button` component inside of `MenuItemGroup` because it will cause a lot of errors. \r\n\r\nIf `Menu.Item` supported the onClick param the development would be must easier and the design would stay consistent.\r\n\r\nYou could ofc add the onClick on the `Menu` and then write something like:\r\n```\r\nconst onClick = ({ key }) => {\r\n  // Use the key here\r\n  // If you want to use a specific key you have to do something like:\r\n  if (key === 'valueOfTheKey') {\r\n    console.log('something')\r\n  }\r\n}\r\n```\r\nBut why do that?\r\n\r\n### What does the proposed API look like?\r\nAdd the onClick param to `Menu.Item`. It would make things a lot easier.\r\n\r\n<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/394558349","html_url":"https://github.com/ant-design/ant-design/issues/9004#issuecomment-394558349","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/9004","id":394558349,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDU1ODM0OQ==","user":{"login":"picodoth","id":1731837,"node_id":"MDQ6VXNlcjE3MzE4Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1731837?v=4","gravatar_id":"","url":"https://api.github.com/users/picodoth","html_url":"https://github.com/picodoth","followers_url":"https://api.github.com/users/picodoth/followers","following_url":"https://api.github.com/users/picodoth/following{/other_user}","gists_url":"https://api.github.com/users/picodoth/gists{/gist_id}","starred_url":"https://api.github.com/users/picodoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/picodoth/subscriptions","organizations_url":"https://api.github.com/users/picodoth/orgs","repos_url":"https://api.github.com/users/picodoth/repos","events_url":"https://api.github.com/users/picodoth/events{/privacy}","received_events_url":"https://api.github.com/users/picodoth/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T02:14:16Z","updated_at":"2018-06-05T02:14:16Z","author_association":"CONTRIBUTOR","body":"> It seems, that is still doesn't work for <Menu.Item />\r\n\r\n@iNaps please provide more details (better with a link), thanks."}}
{"actor":{"display_login":"picodoth"}}