moschan / react-native-simple-radio-button

Simple and handy animated radio button component for React Native
MIT License
453 stars 130 forks source link

onPress called with different param type #144

Open littlehome-eugene opened 4 years ago

littlehome-eugene commented 4 years ago
    updateIsActiveIndex(index) {
      this.setState({ is_active_index: index });
 -    this.props.onPress(this.props.radio_props[index], index)
 +    let value = this.props.radio_props[index] ? this.props.radio_props[index].value : null
 +    this.props.onPress(value, index)
    }