{"action":"opened","issue":{"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/479","repository_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react","labels_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/479/labels{/name}","comments_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/479/comments","events_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/479/events","html_url":"https://github.com/OfficeDev/office-ui-fabric-react/issues/479","id":186894714,"number":479,"title":"Pivot initialSelectedKey does not update on re-render","user":{"login":"wescravens","id":5521219,"avatar_url":"https://avatars.githubusercontent.com/u/5521219?v=3","gravatar_id":"","url":"https://api.github.com/users/wescravens","html_url":"https://github.com/wescravens","followers_url":"https://api.github.com/users/wescravens/followers","following_url":"https://api.github.com/users/wescravens/following{/other_user}","gists_url":"https://api.github.com/users/wescravens/gists{/gist_id}","starred_url":"https://api.github.com/users/wescravens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wescravens/subscriptions","organizations_url":"https://api.github.com/users/wescravens/orgs","repos_url":"https://api.github.com/users/wescravens/repos","events_url":"https://api.github.com/users/wescravens/events{/privacy}","received_events_url":"https://api.github.com/users/wescravens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-02T19:14:56Z","updated_at":"2016-11-02T19:14:56Z","closed_at":null,"body":"Not sure if this was a functional decision for the Pivot component, but updating the `initialSelectedKey` prop does not change the selected PivotItem.  It looks like this prop only matters when the class is constructed, but if I update the prop and re-render, it does not pick up on the new value.  I am trying to be able to switch tabs with the click of a button that is within the `PivotItem` to advance to the next step.  See the example below.\r\n\r\n```jsx\r\nclass Demo extends React.Component {\r\n  state = {\r\n    currentStep: 'step1'\r\n  };\r\n\r\n  render () {\r\n    return (\r\n      <Pivot initialSelectedKey={this.state.currentStep}>\r\n        <PivotItem itemKey=\"step1\">\r\n          <Button onClick={this.setState.bind(this, {currentStep: 'step2'})}>Go to Step 2</Button>\r\n        </PivotItem>\r\n        <PivotItem itemKey=\"step2\">...</PivotItem>\r\n      </Pivot>\r\n    );\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"wescravens"}}