Skip to content

Commit

Permalink
Merge pull request Expensify#45922 from dominictb/fix/45830
Browse files Browse the repository at this point in the history
[CP Staging] fix description is not displayed

(cherry picked from commit 98d30c9)
  • Loading branch information
mountiny authored and OSBotify committed Jul 22, 2024
1 parent aeed122 commit 36a3c0f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ function MoneyRequestView({
amountTitle = translate('iou.receiptStatusTitle');
}

const updatedTransactionDescription = useMemo(() => {
if (!updatedTransaction) {
return undefined;
}
return TransactionUtils.getDescription(updatedTransaction ?? null);
}, [updatedTransaction]);

const saveBillable = useCallback(
(newBillable: boolean) => {
// If the value hasn't changed, don't request to save changes on the server and just close the modal
Expand Down Expand Up @@ -502,7 +509,7 @@ function MoneyRequestView({
<MenuItemWithTopDescription
description={translate('common.description')}
shouldParseTitle
title={TransactionUtils.getDescription(updatedTransaction ?? null) ?? transactionDescription}
title={updatedTransactionDescription ?? transactionDescription}
interactive={canEdit && !readonly}
shouldShowRightIcon={canEdit}
titleStyle={styles.flex1}
Expand Down

0 comments on commit 36a3c0f

Please sign in to comment.