diff --git a/src/components/OfflineWithFeedback.js b/src/components/OfflineWithFeedback.js index 2f99b21b6523..fb0411d24f4c 100644 --- a/src/components/OfflineWithFeedback.js +++ b/src/components/OfflineWithFeedback.js @@ -37,6 +37,9 @@ const propTypes = { /** Whether we should show the error messages */ shouldShowErrorMessages: PropTypes.bool, + /** Whether we should disable opacity */ + shouldDisableOpacity: PropTypes.bool, + /** A function to run when the X button next to the error is clicked */ onClose: PropTypes.func, @@ -63,6 +66,7 @@ const defaultProps = { shouldHideOnDelete: true, errors: null, shouldShowErrorMessages: true, + shouldDisableOpacity: false, onClose: () => {}, style: [], contentContainerStyle: [], @@ -96,7 +100,7 @@ function OfflineWithFeedback(props) { const isOfflinePendingAction = props.network.isOffline && props.pendingAction; const isUpdateOrDeleteError = hasErrors && (props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE); const isAddError = hasErrors && props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD; - const needsOpacity = (isOfflinePendingAction && !isUpdateOrDeleteError) || isAddError; + const needsOpacity = !props.shouldDisableOpacity && ((isOfflinePendingAction && !isUpdateOrDeleteError) || isAddError); const needsStrikeThrough = props.network.isOffline && props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; const hideChildren = props.shouldHideOnDelete && !props.network.isOffline && props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !hasErrors; let children = props.children; diff --git a/src/pages/home/report/ReportActionItemParentAction.js b/src/pages/home/report/ReportActionItemParentAction.js index 2af66779309e..68c5163643b5 100644 --- a/src/pages/home/report/ReportActionItemParentAction.js +++ b/src/pages/home/report/ReportActionItemParentAction.js @@ -53,6 +53,7 @@ function ReportActionItemParentAction(props) { } return (