-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
Current behaviour
RadioGroup will pass onPress to the RadioButton children. That makes not possible to for example have a whole row clickable.
Expected behaviour
Proposed solution:
- If children are solely
RadioButton(s), place theonPresson it - If children contain something else, place a
TouchableRipplearound it with theonPressprop - Suggestions?
Code sample
<RadioButton.Group
onValueChange={value => this.setState({ value })}
value={this.state.value}
>
<View style={styles.row}>
<RadioButton value="first" />
<Text>First</Text>
</View>
<View style={styles.row}>
<RadioButton value="second" />
</View>
</RadioButton.Group>^ in this case, it'd be nice that RadioButton.Group would place a TouchabelRipple around the children and control the onPress.
Your Environment
| software | version |
|---|---|
| react-native-paper | 2.9.1 |