Repository: codypearce/material-bread
Pull request #300 (2019-09-27 15:12:16)

Bugfix/touchevent action item
This PR fixes an issue with React Native where the actionItems array on a ListItem is not tappable.


Patch:
diff --git a/src/Components/Ripple/Ripple.js b/src/Components/Ripple/Ripple.js
index be805fa..46a3854 100644
--- a/src/Components/Ripple/Ripple.js
+++ b/src/Components/Ripple/Ripple.js
@@ -297,9 +297,9 @@ export default class Ripple extends PureComponent {
         {...touchableProps}
         {...panResponder}
         testID={testID}>
-        <Animated.View {...props} pointerEvents="box-only">
+        <Animated.View {...props}>
           {children}
-          <View style={[styles.container, containerStyle]}>
+          <View style={[styles.container, containerStyle]} pointerEvents="none">
             {ripples.map(this.renderRipple)}
           </View>
         </Animated.View>


Test patch:
diff --git a/src/Components/Chip/__snapshots__/Chip.test.js.snap b/src/Components/Chip/__snapshots__/Chip.test.js.snap
index f1fa9c0..4e9f680 100644
--- a/src/Components/Chip/__snapshots__/Chip.test.js.snap
+++ b/src/Components/Chip/__snapshots__/Chip.test.js.snap
@@ -33,7 +33,6 @@ exports[`Chip Renders 1`] = `
     onResponderTerminationRequest={[Function]}
     onRippleAnimation={[Function]}
     onStartShouldSetResponder={[Function]}
-    pointerEvents="box-only"
     rippleCentered={false}
     rippleColor="rgba(0, 0, 0, .87)"
     rippleDuration={400}
@@ -81,6 +80,7 @@ exports[`Chip Renders 1`] = `
       />
     </View>
     <View
+      pointerEvents="none"
       style={
         Array [
           Object {
diff --git a/src/Components/Drawer/DrawerItem/__snapshots__/DrawerItem.test.js.snap b/src/Components/Drawer/DrawerItem/__snapshots__/DrawerItem.test.js.snap
index f293ef1..5093aae 100644
--- a/src/Components/Drawer/DrawerItem/__snapshots__/DrawerItem.test.js.snap
+++ b/src/Components/Drawer/DrawerItem/__snapshots__/DrawerItem.test.js.snap
@@ -12,7 +12,6 @@ exports[`DrawerItem Renders 1`] = `
   onResponderTerminationRequest={[Function]}
   onRippleAnimation={[Function]}
   onStartShouldSetResponder={[Function]}
-  pointerEvents="box-only"
   rippleCentered={false}
   rippleColor="rgba(0, 0, 0, .87)"
   rippleDuration={400}
@@ -50,6 +49,7 @@ exports[`DrawerItem Renders 1`] = `
     }
   />
   <View
+    pointerEvents="none"
     style={
       Array [
         Object {
diff --git a/src/Components/Menu/MenuItem/__snapshots__/MenuItem.test.js.snap b/src/Components/Menu/MenuItem/__snapshots__/MenuItem.test.js.snap
index f8fcb0f..0d489a6 100644
--- a/src/Components/Menu/MenuItem/__snapshots__/MenuItem.test.js.snap
+++ b/src/Components/Menu/MenuItem/__snapshots__/MenuItem.test.js.snap
@@ -23,7 +23,6 @@ exports[`MenuItem Renders 1`] = `
     onResponderTerminationRequest={[Function]}
     onRippleAnimation={[Function]}
     onStartShouldSetResponder={[Function]}
-    pointerEvents="box-only"
     rippleCentered={false}
     rippleColor="rgba(0, 0, 0, .87)"
     rippleDuration={400}
@@ -65,6 +64,7 @@ exports[`MenuItem Renders 1`] = `
       }
     />
     <View
+      pointerEvents="none"
       style={
         Array [
           Object {
diff --git a/src/Components/RadioButton/__snapshots__/RadioButton.test.js.snap b/src/Components/RadioButton/__snapshots__/RadioButton.test.js.snap
index 35af25e..dc96553 100644
--- a/src/Components/RadioButton/__snapshots__/RadioButton.test.js.snap
+++ b/src/Components/RadioButton/__snapshots__/RadioButton.test.js.snap
@@ -23,7 +23,6 @@ exports[`RadioButton Renders 1`] = `
     onResponderTerminationRequest={[Function]}
     onRippleAnimation={[Function]}
     onStartShouldSetResponder={[Function]}
-    pointerEvents="box-only"
     rippleCentered={true}
     rippleColor="rgba(0,0,0,.8)"
     rippleDuration={400}
@@ -57,6 +56,7 @@ exports[`RadioButton Renders 1`] = `
       }
     />
     <View
+      pointerEvents="none"
       style={
         Array [
           Object {
diff --git a/src/Components/Ripple/__snapshots__/Ripple.test.js.snap b/src/Components/Ripple/__snapshots__/Ripple.test.js.snap
index 0fb8af7..1ff87a2 100644
--- a/src/Components/Ripple/__snapshots__/Ripple.test.js.snap
+++ b/src/Components/Ripple/__snapshots__/Ripple.test.js.snap
@@ -12,7 +12,6 @@ exports[`Ripple Renders 1`] = `
   onResponderTerminationRequest={[Function]}
   onRippleAnimation={[Function]}
   onStartShouldSetResponder={[Function]}
-  pointerEvents="box-only"
   rippleCentered={false}
   rippleColor="rgba(0, 0, 0, .87)"
   rippleDuration={400}
@@ -23,6 +22,7 @@ exports[`Ripple Renders 1`] = `
   testID="mb-ripple"
 >
   <View
+    pointerEvents="none"
     style={
       Array [
         Object {