From a4782af69e44100c0ee012e2f712f75e9f9c217f Mon Sep 17 00:00:00 2001 From: Stefanos Togoulidis Date: Thu, 22 Apr 2021 11:46:44 +0300 Subject: [PATCH] Mark TouchableRipple disabled if not editable or tappable (#31052) --- packages/components/src/mobile/bottom-sheet/cell.native.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/components/src/mobile/bottom-sheet/cell.native.js b/packages/components/src/mobile/bottom-sheet/cell.native.js index 4734eb45a05d66..783063a4ef3dc2 100644 --- a/packages/components/src/mobile/bottom-sheet/cell.native.js +++ b/packages/components/src/mobile/bottom-sheet/cell.native.js @@ -159,6 +159,11 @@ class BottomSheetCell extends Component { cellRowContainerStyle, ]; + const isInteractive = + isValueEditable || + onPress !== undefined || + onLongPress !== undefined; + const onCellPress = () => { if ( isValueEditable ) { startEditing(); @@ -308,7 +313,7 @@ class BottomSheetCell extends Component { __( 'Double tap to edit this value' ) : accessibilityHint } - disabled={ disabled } + disabled={ disabled || ! isInteractive } activeOpacity={ opacity } onPress={ onCellPress } onLongPress={ onLongPress }