material-bread
material-bread copied to clipboard
ListItem, conflicts between the component's onPress prop and the actionItem's onPress prop.
Describe the bug
As a user, I'd like ListItem to ignore the press event and just let it work on the actionItem prop. component. Disabling onPress doesn't quite work since it disables the whole component.
To Reproduce You can use this snippet to try out what I mean
<View style={[theme.whiteContainer, styles.container]}>
<Divider />
<ListItem
icon={
<FontAwesome
name="wheelchair"
size={25}
color={getColor("$grey")}
/>
}
text="Please deliver my"
secondaryText="packages bellow 4 feet"
actionItem={
<Switch
checked={lowLocker}
onPress={() => alert(1)}
style={styles.switchStyle}
/>
}
/>
<Divider />
</View>
This'll be fixed in the next release, #300 resolved this issue