material-bread icon indicating copy to clipboard operation
material-bread copied to clipboard

ListItem, conflicts between the component's onPress prop and the actionItem's onPress prop.

Open ricbermo opened this issue 4 years ago • 1 comments

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>

ricbermo avatar Jul 28 '19 17:07 ricbermo

This'll be fixed in the next release, #300 resolved this issue

ds8k avatar Oct 08 '19 21:10 ds8k