我从一个数组中填充了这个RadioForm数组。填充radio_props
效果很好。
constructor() {
super();
this.state = {
loading: true,
radio_props1:[],
value:'',
valueIndex:0,
}
}
但是我遇到的问题是如何
现在,当我单击每个单选按钮时,什么也没发生。
<RadioForm
radio_props={this.state.radio_props1}
initial={this.state.value}
formHorizontal={true}
buttonSize={10}
buttonOuterSize={20}
buttonOuterColor={this.state.valueIndex === index ? '#585858' : '#000'}
borderWidth={1}
animation={true}
isSelected = {(this.state.valueIndex===index?true:false)}
index={index}
buttonInnerColor={'#80146D'}
onPress={(value,index) => {
this.setState({
value: value,
valueIndex: index
})
}}
>
</RadioForm>