【发布时间】:2018-07-03 16:03:56
【问题描述】:
我有单选按钮from internet 的示例。但我只在下面写我用过的。但现在我需要从字符串数组中获取标签
我不太清楚我将如何实现它,希望有人可以帮助我。
图书馆
import RadioForm, {
RadioButton,
RadioButtonInput,
RadioButtonLabel
} from 'react-native-simple-radio-button';
标签
var hobbies = [
{label: "Teasing", value: 0},
{label: "Catching plate", value: 1},
{label: "Soaking in the mud", value: 2},
];
查看
<View style={styles.container}>
<RadioForm
radio_props={hobbies}
initial={0}
onPress={(value) => alert(value)}}
/>
</View>
应该去哪里
{this.state.involvedFriends.map((name, key) => (
<View>
<RadioForm />
</View>
))}
【问题讨论】:
标签: reactjs react-native radio-button