diff --git a/src/components/MoneyRequestConfirmationListFooter.tsx b/src/components/MoneyRequestConfirmationListFooter.tsx index b77e3b993b8d..62e4f1e8b589 100644 --- a/src/components/MoneyRequestConfirmationListFooter.tsx +++ b/src/components/MoneyRequestConfirmationListFooter.tsx @@ -35,6 +35,7 @@ import PDFThumbnail from './PDFThumbnail'; import PressableWithoutFocus from './Pressable/PressableWithoutFocus'; import ReceiptEmptyState from './ReceiptEmptyState'; import ReceiptImage from './ReceiptImage'; +import {ShowContextMenuContext} from './ShowContextMenuContext'; import ShowMoreButton from './ShowMoreButton'; type MoneyRequestConfirmationListFooterProps = { @@ -268,6 +269,18 @@ function MoneyRequestConfirmationListFooter({ const resolvedThumbnail = isLocalFile ? receiptThumbnail : tryResolveUrlFromApiRoot(receiptThumbnail ?? ''); const resolvedReceiptImage = isLocalFile ? receiptImage : tryResolveUrlFromApiRoot(receiptImage ?? ''); + const contextMenuContextValue = useMemo( + () => ({ + anchor: null, + report: undefined, + reportNameValuePairs: undefined, + action: undefined, + checkIfContextMenuActive: () => {}, + isDisabled: true, + }), + [], + ); + const mentionReportContextValue = useMemo(() => ({currentReportID: reportID}), [reportID]); // An intermediate structure that helps us classify the fields as "primary" and "supplementary". @@ -300,29 +313,31 @@ function MoneyRequestConfirmationListFooter({ }, { item: ( - - + { - Navigation.navigate( - ROUTES.MONEY_REQUEST_STEP_DESCRIPTION.getRoute(action, iouType, transactionID, reportID, Navigation.getActiveRouteWithoutParams(), reportActionID), - ); - }} - style={[styles.moneyRequestMenuItem]} - titleStyle={styles.flex1} - disabled={didConfirm} - interactive={!isReadOnly} - numberOfLinesTitle={2} - /> - + value={mentionReportContextValue} + > + { + Navigation.navigate( + ROUTES.MONEY_REQUEST_STEP_DESCRIPTION.getRoute(action, iouType, transactionID, reportID, Navigation.getActiveRouteWithoutParams(), reportActionID), + ); + }} + style={[styles.moneyRequestMenuItem]} + titleStyle={styles.flex1} + disabled={didConfirm} + interactive={!isReadOnly} + numberOfLinesTitle={2} + /> + + ), shouldShow: true, isSupplementary: false, diff --git a/src/pages/home/report/ReportActionItemContentCreated.tsx b/src/pages/home/report/ReportActionItemContentCreated.tsx index 21bb6471f5b1..ad40df3d5213 100644 --- a/src/pages/home/report/ReportActionItemContentCreated.tsx +++ b/src/pages/home/report/ReportActionItemContentCreated.tsx @@ -74,6 +74,8 @@ function ReportActionItemContentCreated({contextValue, parentReportAction, trans [shouldHideThreadDividerLine, report.reportID, styles.reportHorizontalRule], ); + const contextMenuValue = useMemo(() => ({...contextValue, isDisabled: true}), [contextValue]); + if (ReportActionsUtils.isTransactionThread(parentReportAction)) { const isReversedTransaction = ReportActionsUtils.isReversedTransaction(parentReportAction); @@ -104,7 +106,7 @@ function ReportActionItemContentCreated({contextValue, parentReportAction, trans } return ( - + - +