diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 862b82edd25f..c45c1b852eb9 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -926,6 +926,11 @@ function MoneyReportHeader({ const isMobileSelectionModeEnabled = useMobileSelectionMode(); if (isMobileSelectionModeEnabled) { + // If mobile selection mode is enabled but only one or no transactions remain, turn it off + if (transactions.length <= 1) { + turnOffMobileSelectionMode(); + } + return ( { + const handleGoBack = () => { if (isEditing) { - Navigation.dismissModalWithReport({reportID: id}); + Navigation.dismissModal(); } else { Navigation.goBack(backTo); } @@ -88,7 +88,7 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) { changeTransactionsReport([transaction.transactionID], item.value); } - handleGoBackWithReportID(item.value); + handleGoBack(); }; const selectReport = (item: TransactionGroupListItem) => { @@ -100,7 +100,7 @@ function IOURequestStepReport({route, transaction}: IOURequestStepReportProps) { // Early return for same report selection if (isSameReport) { - handleGoBackWithReportID(item.value); + handleGoBack(); return; }