lib/index.js
function componentWillReceiveProps(nextProps) {
      var children = this.props.children;
      var index = children.findIndex(function (c) {
        return c.props.value === nextProps.value && !c.props.disabled;
      });
      if (index !== -1 && index !== this.state.checkedIndex) {
        this.setState({ checkedIndex: index });
      }
    }
function componentWillReceiveProps(nextProps) {
      var children = this.props.children;
      var index = children.findIndex(function (c) {
        return c.props.value === nextProps.value && !c.props.disabled;
      });
      if (index !== -1 && index !== this.state.checkedIndex) {
        this.setState({ checkedIndex: index });
      }
    }
function componentWillReceiveProps ( nextProps ) { var children = this . props . children ; var index = children . findIndex ( function ( c ) { return c . props . value === nextProps . value && ! c . props . disabled ; } ) ; if ( index !== - 1 && index !== this . state . checkedIndex ) { this . setState ( { checkedIndex : index } ) ; } }
This is the case to handle late arriving props, and set the state according to the value as long as it's not disabled
This is the case to handle late arriving props and set the state according to the value as long as it s not disabled