DigitalRiver / react-atlas

Composable React components with CSS Modules.
http://digitalriver.github.io/react-atlas/
MIT License
38 stars 25 forks source link

Tabs: componentWillReceiveProps needed for selectedIndex prop #913

Closed Darper closed 5 years ago

Darper commented 5 years ago

Add the following to Tabs.js ...

UNSAFE_componentWillReceiveProps(nextProps) {
  if (nextProps.selectedIndex !== this.props.selectedIndex) {
    this.setState({ "selectedIndex": nextProps.selectedIndex });
  }
}