{"action":"created","issue":{"url":"https://api.github.com/repos/i-like-robots/react-tags/issues/36","repository_url":"https://api.github.com/repos/i-like-robots/react-tags","labels_url":"https://api.github.com/repos/i-like-robots/react-tags/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/i-like-robots/react-tags/issues/36/comments","events_url":"https://api.github.com/repos/i-like-robots/react-tags/issues/36/events","html_url":"https://github.com/i-like-robots/react-tags/pull/36","id":173497036,"number":36,"title":"Makes the tag rendering component configurable... keeps original default","user":{"login":"marcusmateus","id":19707,"avatar_url":"https://avatars.githubusercontent.com/u/19707?v=3","gravatar_id":"","url":"https://api.github.com/users/marcusmateus","html_url":"https://github.com/marcusmateus","followers_url":"https://api.github.com/users/marcusmateus/followers","following_url":"https://api.github.com/users/marcusmateus/following{/other_user}","gists_url":"https://api.github.com/users/marcusmateus/gists{/gist_id}","starred_url":"https://api.github.com/users/marcusmateus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcusmateus/subscriptions","organizations_url":"https://api.github.com/users/marcusmateus/orgs","repos_url":"https://api.github.com/users/marcusmateus/repos","events_url":"https://api.github.com/users/marcusmateus/events{/privacy}","received_events_url":"https://api.github.com/users/marcusmateus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-26T16:53:56Z","updated_at":"2016-08-27T09:56:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/i-like-robots/react-tags/pulls/36","html_url":"https://github.com/i-like-robots/react-tags/pull/36","diff_url":"https://github.com/i-like-robots/react-tags/pull/36.diff","patch_url":"https://github.com/i-like-robots/react-tags/pull/36.patch"},"body":"Allows passing a custom component to ReactTags to perform the actual rendering of each tag:\r\n\r\n```jsx\r\nclass CustomTag extends React.Component {\r\n  render() {\r\n     return(<span>My tag: {this.props.tag.name}</span>)\r\n  }\r\n}\r\n\r\n<ReactTags\r\n  handleAddition={additionHandler}\r\n  handleDelete={deleteHandler}\r\n  tags={tags}\r\n  tagComponent={CustomTag}\r\n/>\r\n```\r\n\r\nIf no tagComponent is passed, then it uses the existing renderer component as the default."},"comment":{"url":"https://api.github.com/repos/i-like-robots/react-tags/issues/comments/242908041","html_url":"https://github.com/i-like-robots/react-tags/pull/36#issuecomment-242908041","issue_url":"https://api.github.com/repos/i-like-robots/react-tags/issues/36","id":242908041,"user":{"login":"i-like-robots","id":271645,"avatar_url":"https://avatars.githubusercontent.com/u/271645?v=3","gravatar_id":"","url":"https://api.github.com/users/i-like-robots","html_url":"https://github.com/i-like-robots","followers_url":"https://api.github.com/users/i-like-robots/followers","following_url":"https://api.github.com/users/i-like-robots/following{/other_user}","gists_url":"https://api.github.com/users/i-like-robots/gists{/gist_id}","starred_url":"https://api.github.com/users/i-like-robots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i-like-robots/subscriptions","organizations_url":"https://api.github.com/users/i-like-robots/orgs","repos_url":"https://api.github.com/users/i-like-robots/repos","events_url":"https://api.github.com/users/i-like-robots/events{/privacy}","received_events_url":"https://api.github.com/users/i-like-robots/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T09:56:01Z","updated_at":"2016-08-27T09:56:01Z","body":"Thank you for taking the time to suggest and implement this feature @marcusmateus! I'm a little unsure what the use case for this is, what sort of thing were you thinking?\r\n\r\nIn my opinion the button element is optimal as the tags are interactive. Adding custom text as you have done above could possibly be implemented with CSS:\r\n\r\n```css\r\n.react-tags__selected-tag-name:before {\r\n  content: 'My tag: ';\r\n}\r\n```\r\n\r\nOr possibly when passing the tags prop down to the component:\r\n\r\n```js\r\nrender () {\r\n  const tags = this.state.tags.map(tag => ({ name: `My tag: ${tag.name}`, id: tag.id }))\r\n\r\n  return <ReactTags tags={tags} ... />\r\n}\r\n```\r\n\r\nWould either of these approaches suffice rather than adding a new feature?"}}
{"actor":{"display_login":"i-like-robots"}}