{"action":"created","issue":{"url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/issues/172","repository_url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input","labels_url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/issues/172/comments","events_url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/issues/172/events","html_url":"https://github.com/TeamWertarbyte/material-ui-chip-input/issues/172","id":284742140,"number":172,"title":"Customize autocomplete MenuItem","user":{"login":"darkchaplain","id":7280838,"avatar_url":"https://avatars1.githubusercontent.com/u/7280838?v=4","gravatar_id":"","url":"https://api.github.com/users/darkchaplain","html_url":"https://github.com/darkchaplain","followers_url":"https://api.github.com/users/darkchaplain/followers","following_url":"https://api.github.com/users/darkchaplain/following{/other_user}","gists_url":"https://api.github.com/users/darkchaplain/gists{/gist_id}","starred_url":"https://api.github.com/users/darkchaplain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkchaplain/subscriptions","organizations_url":"https://api.github.com/users/darkchaplain/orgs","repos_url":"https://api.github.com/users/darkchaplain/repos","events_url":"https://api.github.com/users/darkchaplain/events{/privacy}","received_events_url":"https://api.github.com/users/darkchaplain/received_events","type":"User","site_admin":false},"labels":[{"id":438408700,"url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":438419060,"url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/labels/feature%20request","name":"feature request","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-12-27T15:19:06Z","updated_at":"2017-12-28T14:59:57Z","closed_at":null,"author_association":"NONE","body":"I'm trying to customize `MenuItem` as it's described in http://www.material-ui.com/#/components/auto-complete.\r\nHere is the code: \r\n```\r\nimport React from 'react';\r\nimport ChipInput from 'material-ui-chip-input';\r\nimport { MenuItem } from 'material-ui';\r\n\r\nconst CategoryTags = () => {\r\n  const dataSource = [\r\n    {\r\n      text: 'text-value1',\r\n      value: (\r\n        <MenuItem\r\n          primaryText='text-value1'\r\n          secondaryText='&#9786;'\r\n        />\r\n      ),\r\n    },\r\n    {\r\n      text: 'text-value2',\r\n      value: (\r\n        <MenuItem\r\n          primaryText='text-value2'\r\n          secondaryText='&#9786;'\r\n        />\r\n      ),\r\n    },\r\n  ];\r\n\r\n  return (\r\n    <div>\r\n      <ChipInput\r\n        fullWidth\r\n        hintText='Categories'\r\n        openOnFocus\r\n        dataSource={dataSource}\r\n      />\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default CategoryTags;\r\n```\r\nI can see customized menu items when I type something:\r\n<img width=\"604\" alt=\"screen shot 2017-12-27 at 5 14 38 pm\" src=\"https://user-images.githubusercontent.com/7280838/34385175-8931998a-eb29-11e7-8a3a-776767383f44.png\">\r\nBut I get an error when I choose menu item:\r\n```\r\nUncaught TypeError: chip.trim is not a function\r\n    at ChipInput.handleAddChip (bundle.js:96683)\r\n    at Object.onAutocompleteItemClick [as onItemClick] (bundle.js:96581)\r\n    at Menu.handleMenuItemClick (bundle.js:7367)\r\n    at Object.onClick (bundle.js:7269)\r\n    at Object.ListItem._this.handleClick [as onClick] (bundle.js:10284)\r\n    at EnhancedButton._this.handleClick (bundle.js:1160)\r\n    at HTMLUnknownElement.callCallback (bundle.js:40398)\r\n    at Object.invokeGuardedCallbackDev (bundle.js:40437)\r\n    at Object.invokeGuardedCallback (bundle.js:40294)\r\n    at Object.invokeGuardedCallbackAndCatchFirstError (bundle.js:40308)\r\n```\r\n`material-ui-chip-input` version is 0.18.4\r\n`material-ui` version is 0.20.0\r\n\r\nCan I get help on this issue please?"},"comment":{"url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/issues/comments/354301296","html_url":"https://github.com/TeamWertarbyte/material-ui-chip-input/issues/172#issuecomment-354301296","issue_url":"https://api.github.com/repos/TeamWertarbyte/material-ui-chip-input/issues/172","id":354301296,"user":{"login":"leMaik","id":5544859,"avatar_url":"https://avatars2.githubusercontent.com/u/5544859?v=4","gravatar_id":"","url":"https://api.github.com/users/leMaik","html_url":"https://github.com/leMaik","followers_url":"https://api.github.com/users/leMaik/followers","following_url":"https://api.github.com/users/leMaik/following{/other_user}","gists_url":"https://api.github.com/users/leMaik/gists{/gist_id}","starred_url":"https://api.github.com/users/leMaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leMaik/subscriptions","organizations_url":"https://api.github.com/users/leMaik/orgs","repos_url":"https://api.github.com/users/leMaik/repos","events_url":"https://api.github.com/users/leMaik/events{/privacy}","received_events_url":"https://api.github.com/users/leMaik/received_events","type":"User","site_admin":false},"created_at":"2017-12-28T14:59:57Z","updated_at":"2017-12-28T14:59:57Z","author_association":"OWNER","body":"@darkchaplain \r\n\r\n> because the only way to customize menu item is to modify datasource\r\n\r\nBut a better way to customize the menu items would be to _customize the menu items_ by adding a callback that can do that."}}
{"actor":{"display_login":"leMaik"}}