{"action":"created","issue":{"url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/81","labels_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/81/comments","events_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/81/events","html_url":"https://github.com/moroshko/react-autosuggest/issues/81","id":113375711,"number":81,"title":"defaultValue don't works","user":{"login":"tarsisazevedo","id":118348,"avatar_url":"https://avatars.githubusercontent.com/u/118348?v=3","gravatar_id":"","url":"https://api.github.com/users/tarsisazevedo","html_url":"https://github.com/tarsisazevedo","followers_url":"https://api.github.com/users/tarsisazevedo/followers","following_url":"https://api.github.com/users/tarsisazevedo/following{/other_user}","gists_url":"https://api.github.com/users/tarsisazevedo/gists{/gist_id}","starred_url":"https://api.github.com/users/tarsisazevedo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarsisazevedo/subscriptions","organizations_url":"https://api.github.com/users/tarsisazevedo/orgs","repos_url":"https://api.github.com/users/tarsisazevedo/repos","events_url":"https://api.github.com/users/tarsisazevedo/events{/privacy}","received_events_url":"https://api.github.com/users/tarsisazevedo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-26T15:04:36Z","updated_at":"2015-10-26T15:27:16Z","closed_at":"2015-10-26T15:27:16Z","body":"I start using react-autosuggest and it's an amazing react component. But I have a problem when I try to set up defaultValue. I wrap autosuggest in another react component because project needs.\r\n\r\n```\r\nvar VideoSuggest = React.createClass({\r\n    getInitialState: function(){\r\n        return {\r\n            value: \"\"\r\n        }\r\n    },\r\n   getSuggestions: function(input, callback) {\r\n        ...\r\n    },\r\n    componentDidMount: function() {\r\n        this.onInputChange(this.props.value);\r\n    },\r\n    suggestionSelected: function(suggestion, e) {\r\n        e.preventDefault();\r\n        this.setState({value: suggestion})\r\n        this.props.handler(this.props.aKey, suggestion, \"http://semantic-api/test\");\r\n    },\r\n    onInputChange: function(value) {\r\n        this.setState({value: value})\r\n        this.props.handler(this.props.aKey, value, \"http://semantic-api/test\");\r\n    },\r\n    render: function() {\r\n        var inputAttr = {\r\n            placeholder: this.props.type,\r\n            className: \"\",\r\n            onChange: this.onInputChange\r\n        }\r\n        return (\r\n            <li ref={this.props.key}>\r\n                <Autosuggest\r\n                inputAttributes={inputAttr}\r\n                suggestions={this.getSuggestions}\r\n                onSuggestionSelected={this.suggestionSelected}\r\n                defaultValue={this.state.value}/>\r\n            </li>\r\n        )\r\n    }\r\n});\r\n```\r\nIn react debugger defaultValue is ok but state.value not. \r\n![screen shot 2015-10-26 at 1 03 52 pm](https://cloud.githubusercontent.com/assets/118348/10732628/0eaa46b6-7be2-11e5-9c0a-c2f8ee847fc4.png)\r\n\r\nWhat's wrong?"},"comment":{"url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/comments/151174388","html_url":"https://github.com/moroshko/react-autosuggest/issues/81#issuecomment-151174388","issue_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/81","id":151174388,"user":{"login":"tarsisazevedo","id":118348,"avatar_url":"https://avatars.githubusercontent.com/u/118348?v=3","gravatar_id":"","url":"https://api.github.com/users/tarsisazevedo","html_url":"https://github.com/tarsisazevedo","followers_url":"https://api.github.com/users/tarsisazevedo/followers","following_url":"https://api.github.com/users/tarsisazevedo/following{/other_user}","gists_url":"https://api.github.com/users/tarsisazevedo/gists{/gist_id}","starred_url":"https://api.github.com/users/tarsisazevedo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarsisazevedo/subscriptions","organizations_url":"https://api.github.com/users/tarsisazevedo/orgs","repos_url":"https://api.github.com/users/tarsisazevedo/repos","events_url":"https://api.github.com/users/tarsisazevedo/events{/privacy}","received_events_url":"https://api.github.com/users/tarsisazevedo/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T15:27:16Z","updated_at":"2015-10-26T15:27:16Z","body":"I update the component and it works! sorry :)"}}