react-native-gifted-form
react-native-gifted-form copied to clipboard
How to Set Values in SelectWidget - Getting values from states
I am getting my value in state.those values in state i want selected in SelectWidget. And after i can change from female to Male.
this.state = {
gender:F
}
<GiftedForm.ModalWidget
title='Gender'
displayValue='gender'
image={require('../../assets/icons/color/gender.png')}
>
<GiftedForm.SeparatorWidget />
<GiftedForm.SelectWidget name='gender' title='Gender' multiple={false}>
<GiftedForm.OptionWidget image={require('../../assets/icons/color/female.png')} title='Female' value='F'/>
<GiftedForm.OptionWidget image={require('../../assets/icons/color/male.png')} title='Male' value='M'/>
</GiftedForm.SelectWidget>
</GiftedForm.ModalWidget>