From e57db58e0aad5ce556094e035029f6696662c3c2 Mon Sep 17 00:00:00 2001 From: Vit Horacek <36083550+mountiny@users.noreply.github.com> Date: Thu, 5 Oct 2023 19:44:23 +0100 Subject: [PATCH] Merge pull request #28931 from rezkiy37/fix/28919-disabled-fields-on-confirm-task [CP Staging] Fix disabled chevron of "MenuItem" (cherry picked from commit 74ce7322bb34643468dfe4ce96985f666156e472) --- src/components/MenuItem.js | 16 +++------------- src/components/menuItemPropTypes.js | 6 ------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 7d10b5d0bee8..d5c753d83735 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -2,7 +2,6 @@ import _ from 'underscore'; import React, {useEffect, useMemo} from 'react'; import {View} from 'react-native'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import PressableWithFeedback from './Pressable/PressableWithFeedback'; import Text from './Text'; import styles from '../styles/styles'; import themeColors from '../styles/themes/default'; @@ -50,8 +49,6 @@ const defaultProps = { iconHeight: undefined, description: undefined, iconRight: Expensicons.ArrowRight, - onIconRightPress: undefined, - iconRightAccessibilityLabel: undefined, iconStyles: [], iconFill: undefined, secondaryIconFill: undefined, @@ -136,7 +133,7 @@ const MenuItem = React.forwardRef((props, ref) => { return ''; }, [props.title, props.shouldRenderAsHTML, props.shouldParseTitle, html]); - const hasPressableRightComponent = props.onIconRightPress || props.iconRight || (props.rightComponent && props.shouldShowRightComponent); + const hasPressableRightComponent = props.iconRight || (props.rightComponent && props.shouldShowRightComponent); return ( @@ -345,19 +342,12 @@ const MenuItem = React.forwardRef((props, ref) => { )} {Boolean(props.shouldShowRightIcon) && ( - + - + )} {props.shouldShowRightComponent && props.rightComponent} {props.shouldShowSelectedState && } diff --git a/src/components/menuItemPropTypes.js b/src/components/menuItemPropTypes.js index 917eabe540ae..e33170ac67f4 100644 --- a/src/components/menuItemPropTypes.js +++ b/src/components/menuItemPropTypes.js @@ -67,12 +67,6 @@ const propTypes = { /** Overrides the icon for shouldShowRightIcon */ iconRight: PropTypes.elementType, - /** Function to fire when the right icon has been pressed */ - onIconRightPress: PropTypes.func, - - /** accessibilityLabel for the right icon when it's pressable */ - iconRightAccessibilityLabel: PropTypes.string, - /** A description text to show under the title */ description: PropTypes.string,