{"action":"closed","issue":{"url":"https://api.github.com/repos/callemall/material-ui/issues/8728","repository_url":"https://api.github.com/repos/callemall/material-ui","labels_url":"https://api.github.com/repos/callemall/material-ui/issues/8728/labels{/name}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/8728/comments","events_url":"https://api.github.com/repos/callemall/material-ui/issues/8728/events","html_url":"https://github.com/callemall/material-ui/issues/8728","id":266029847,"number":8728,"title":"Material UI - Tabs (Initial selected) props is not setting for dynamically created tab","user":{"login":"Dhineshtyr","id":9817854,"avatar_url":"https://avatars0.githubusercontent.com/u/9817854?v=4","gravatar_id":"","url":"https://api.github.com/users/Dhineshtyr","html_url":"https://github.com/Dhineshtyr","followers_url":"https://api.github.com/users/Dhineshtyr/followers","following_url":"https://api.github.com/users/Dhineshtyr/following{/other_user}","gists_url":"https://api.github.com/users/Dhineshtyr/gists{/gist_id}","starred_url":"https://api.github.com/users/Dhineshtyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dhineshtyr/subscriptions","organizations_url":"https://api.github.com/users/Dhineshtyr/orgs","repos_url":"https://api.github.com/users/Dhineshtyr/repos","events_url":"https://api.github.com/users/Dhineshtyr/events{/privacy}","received_events_url":"https://api.github.com/users/Dhineshtyr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-17T08:08:13Z","updated_at":"2017-10-17T08:10:42Z","closed_at":"2017-10-17T08:10:42Z","author_association":"NONE","body":"Code : \r\n```\r\nconst createTab = (tab, isSelected) => (\r\n  <Tab\r\n    key={tab.to}\r\n    label={tab.label}\r\n    >\r\n    <h2>{tab.label}</h2>\r\n  </Tab>\r\n);\r\n\r\nexport const MdTabs = (props) => {\r\n  const tabs = props.tabs.map((tab, index) => {\r\n    const htmlTabs = createTab(tab, props.initialSelectedIndex === index);\r\n    return (htmlTabs);\r\n  });\r\n  \r\n  return (\r\n    <MuiThemeProvider muiTheme={muiTheme}>\r\n      <Tabs initialSelectedIndex=\"1\" >\r\n        {tabs}\r\n      </Tabs>\r\n    </MuiThemeProvider>\r\n  );\r\n};\r\n\r\n```\r\n=============================\r\nIn the code above i'm trying to create dynamic tabs. and i wanted to select second tab is selected. \r\nBut the response is zeroth index, that is first tab is selected by default.\r\n\r\nCan anyone help me to solve this isse. \r\n\r\nThanks"}}
{"actor":{"display_login":"oliviertassinari"}}