{"action":"created","issue":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/issues/1799","repository_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React","labels_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/issues/1799/labels{/name}","comments_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/issues/1799/comments","events_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/issues/1799/events","html_url":"https://github.com/Semantic-Org/Semantic-UI-React/pull/1799","id":238389799,"number":1799,"title":"fix(AutoControlledComponent): use setState instead of an assign","user":{"login":"layershifter","id":14183168,"avatar_url":"https://avatars3.githubusercontent.com/u/14183168?v=3","gravatar_id":"","url":"https://api.github.com/users/layershifter","html_url":"https://github.com/layershifter","followers_url":"https://api.github.com/users/layershifter/followers","following_url":"https://api.github.com/users/layershifter/following{/other_user}","gists_url":"https://api.github.com/users/layershifter/gists{/gist_id}","starred_url":"https://api.github.com/users/layershifter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/layershifter/subscriptions","organizations_url":"https://api.github.com/users/layershifter/orgs","repos_url":"https://api.github.com/users/layershifter/repos","events_url":"https://api.github.com/users/layershifter/events{/privacy}","received_events_url":"https://api.github.com/users/layershifter/received_events","type":"User","site_admin":false},"labels":[{"id":432565724,"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/labels/ready%20for%20review","name":"ready for review","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-25T16:10:53Z","updated_at":"2017-07-07T17:06:47Z","closed_at":"2017-06-26T16:51:49Z","pull_request":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/pulls/1799","html_url":"https://github.com/Semantic-Org/Semantic-UI-React/pull/1799","diff_url":"https://github.com/Semantic-Org/Semantic-UI-React/pull/1799.diff","patch_url":"https://github.com/Semantic-Org/Semantic-UI-React/pull/1799.patch"},"body":"Fixes #1761.\r\nFixes #1682.\r\n\r\nIn #1770, I suggested that the problem is in that `setState` is an async, I was right. `AutoControlledComponent` component's children such as `Dropdown` and  `Search` had own logic inside the `componentWillMount` method that relied on the current state.\r\n\r\nThe `componentWillMount` method was renamed to `constructor` as it's a single place where `state` is assignable. However, we need to have ability to assign an initial state, so I added the `initialState` method that accepts `props` as an argument.\r\n\r\n@apiv Thanks for you suggestions in #1770."},"comment":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/issues/comments/313739111","html_url":"https://github.com/Semantic-Org/Semantic-UI-React/pull/1799#issuecomment-313739111","issue_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-React/issues/1799","id":313739111,"user":{"login":"levithomason","id":5067638,"avatar_url":"https://avatars0.githubusercontent.com/u/5067638?v=3","gravatar_id":"","url":"https://api.github.com/users/levithomason","html_url":"https://github.com/levithomason","followers_url":"https://api.github.com/users/levithomason/followers","following_url":"https://api.github.com/users/levithomason/following{/other_user}","gists_url":"https://api.github.com/users/levithomason/gists{/gist_id}","starred_url":"https://api.github.com/users/levithomason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levithomason/subscriptions","organizations_url":"https://api.github.com/users/levithomason/orgs","repos_url":"https://api.github.com/users/levithomason/repos","events_url":"https://api.github.com/users/levithomason/events{/privacy}","received_events_url":"https://api.github.com/users/levithomason/received_events","type":"User","site_admin":false},"created_at":"2017-07-07T17:06:47Z","updated_at":"2017-07-07T17:06:47Z","body":"Released in `semantic-ui-react@0.71.0`."}}
{"actor":{"display_login":"levithomason"}}