Skip to content

Commit

Permalink
Merge pull request #35285 from bernhardoj/fix/35244-missing-context-m…
Browse files Browse the repository at this point in the history
…enu-options

Fix missing context menu options on money request preview

(cherry picked from commit df52347)
  • Loading branch information
srikarparsi authored and OSBotify committed Jan 29, 2024
1 parent d3f58d9 commit cbf5994
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/ReportActionItem/MoneyRequestAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const propTypes = {
/** The ID of the associated request report */
requestReportID: PropTypes.string.isRequired,

/** The ID of the current report */
reportID: PropTypes.string.isRequired,

/** Is this IOUACTION the most recent? */
isMostRecentIOUReportAction: PropTypes.bool.isRequired,

Expand Down Expand Up @@ -81,6 +84,7 @@ function MoneyRequestAction({
action,
chatReportID,
requestReportID,
reportID,
isMostRecentIOUReportAction,
contextMenuAnchor,
checkIfContextMenuActive,
Expand Down Expand Up @@ -136,6 +140,7 @@ function MoneyRequestAction({
<MoneyRequestPreview
iouReportID={requestReportID}
chatReportID={chatReportID}
reportID={reportID}
isBillSplit={isSplitBillAction}
action={action}
contextMenuAnchor={contextMenuAnchor}
Expand Down
5 changes: 4 additions & 1 deletion src/components/ReportActionItem/MoneyRequestPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const propTypes = {
/** The associated chatReport */
chatReportID: PropTypes.string.isRequired,

/** The ID of the current report */
reportID: PropTypes.string.isRequired,

/** Callback for the preview pressed */
onPreviewPressed: PropTypes.func,

Expand Down Expand Up @@ -188,7 +191,7 @@ function MoneyRequestPreview(props) {
};

const showContextMenu = (event) => {
showContextMenuForReport(event, props.contextMenuAnchor, props.chatReportID, props.action, props.checkIfContextMenuActive);
showContextMenuForReport(event, props.contextMenuAnchor, props.reportID, props.action, props.checkIfContextMenuActive);
};

const getPreviewHeaderText = () => {
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ function ReportActionItem(props) {
// If originalMessage.iouReportID is set, this is a 1:1 money request in a DM chat whose reportID is props.report.chatReportID
chatReportID={originalMessage.IOUReportID ? props.report.chatReportID : props.report.reportID}
requestReportID={iouReportID}
reportID={props.report.reportID}
action={props.action}
isMostRecentIOUReportAction={props.isMostRecentIOUReportAction}
isHovered={hovered}
Expand Down

0 comments on commit cbf5994

Please sign in to comment.