{"action":"created","issue":{"url":"https://api.github.com/repos/react-component/menu/issues/5","labels_url":"https://api.github.com/repos/react-component/menu/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/react-component/menu/issues/5/comments","events_url":"https://api.github.com/repos/react-component/menu/issues/5/events","html_url":"https://github.com/react-component/menu/issues/5","id":64387626,"number":5,"title":"Issue with using conditional `disabled` attribute on MenuItems","user":{"login":"quicksnap","id":1199742,"avatar_url":"https://avatars.githubusercontent.com/u/1199742?v=3","gravatar_id":"","url":"https://api.github.com/users/quicksnap","html_url":"https://github.com/quicksnap","followers_url":"https://api.github.com/users/quicksnap/followers","following_url":"https://api.github.com/users/quicksnap/following{/other_user}","gists_url":"https://api.github.com/users/quicksnap/gists{/gist_id}","starred_url":"https://api.github.com/users/quicksnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quicksnap/subscriptions","organizations_url":"https://api.github.com/users/quicksnap/orgs","repos_url":"https://api.github.com/users/quicksnap/repos","events_url":"https://api.github.com/users/quicksnap/events{/privacy}","received_events_url":"https://api.github.com/users/quicksnap/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/react-component/menu/milestones/3","html_url":"https://github.com/react-component/menu/milestones/3.1.0","labels_url":"https://api.github.com/repos/react-component/menu/milestones/3/labels","id":1039982,"number":3,"title":"3.1.0","description":"","creator":{"login":"yiminghe","id":200876,"avatar_url":"https://avatars.githubusercontent.com/u/200876?v=3","gravatar_id":"","url":"https://api.github.com/users/yiminghe","html_url":"https://github.com/yiminghe","followers_url":"https://api.github.com/users/yiminghe/followers","following_url":"https://api.github.com/users/yiminghe/following{/other_user}","gists_url":"https://api.github.com/users/yiminghe/gists{/gist_id}","starred_url":"https://api.github.com/users/yiminghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiminghe/subscriptions","organizations_url":"https://api.github.com/users/yiminghe/orgs","repos_url":"https://api.github.com/users/yiminghe/repos","events_url":"https://api.github.com/users/yiminghe/events{/privacy}","received_events_url":"https://api.github.com/users/yiminghe/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"closed","created_at":"2015-03-26T13:34:04Z","updated_at":"2015-03-26T13:34:39Z","due_on":null,"closed_at":"2015-03-26T13:34:39Z"},"comments":3,"created_at":"2015-03-25T22:34:35Z","updated_at":"2015-03-26T18:11:41Z","closed_at":"2015-03-26T13:32:09Z","body":"I have a requirement that selected MenuItems should appear disabled. I tried this: \r\n\r\n```javascript\r\n        <MenuItem\r\n          key={id}\r\n          disabled={ id === this.state.selectedId } >\r\n            {menuItemName}\r\n        </MenuItem>\r\n```\r\n\r\nThis causes issues on this line: https://github.com/react-component/menu/blob/master/lib/Menu.js#L155\r\n\r\nsince this code causes onDeselect not to be defined: https://github.com/react-component/menu/blob/master/lib/Menu.js#L218-L221\r\n\r\nI've disabled the `disabled` check and it seems to fix my menu. Is this premature `return` necessary?"},"comment":{"url":"https://api.github.com/repos/react-component/menu/issues/comments/86652299","html_url":"https://github.com/react-component/menu/issues/5#issuecomment-86652299","issue_url":"https://api.github.com/repos/react-component/menu/issues/5","id":86652299,"user":{"login":"yiminghe","id":200876,"avatar_url":"https://avatars.githubusercontent.com/u/200876?v=3","gravatar_id":"","url":"https://api.github.com/users/yiminghe","html_url":"https://github.com/yiminghe","followers_url":"https://api.github.com/users/yiminghe/followers","following_url":"https://api.github.com/users/yiminghe/following{/other_user}","gists_url":"https://api.github.com/users/yiminghe/gists{/gist_id}","starred_url":"https://api.github.com/users/yiminghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiminghe/subscriptions","organizations_url":"https://api.github.com/users/yiminghe/orgs","repos_url":"https://api.github.com/users/yiminghe/repos","events_url":"https://api.github.com/users/yiminghe/events{/privacy}","received_events_url":"https://api.github.com/users/yiminghe/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T18:11:41Z","updated_at":"2015-03-26T18:11:41Z","body":"yes, modify state/props directly is a bad practice (as react 0.13 emphasized), i didn't notice it before."}}