ThakurBallary/react-native-radio-buttons-group

[ENHANCEMENT] Default Selection based on props

Closed this issue · 2 comments

Consider I have category state with value either A,B,C intialized by navigation props

I declared radio state as per docs with labels and value

I want the initial radio selected as per

This.state.radio.value == this.state.category

Thanks from future ! 👍

The defualt always seems to be radio[0] the first element of my radio state array

Hope you can find a possible solution with v2.0.0 as there are a lots of enhancements made to the package.

If you need help, please share the code snippet or link to example on expo snack would be appreciated.