-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: unable to dismiss deleted rate error #47489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,7 @@ import * as Member from '@userActions/Policy/Member'; | |
| import * as Report from '@userActions/Report'; | ||
| import * as ReportActions from '@userActions/ReportActions'; | ||
| import * as Session from '@userActions/Session'; | ||
| import * as Transaction from '@userActions/Transaction'; | ||
| import * as User from '@userActions/User'; | ||
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
|
@@ -925,7 +926,13 @@ function ReportActionItem({ | |
| )} | ||
| > | ||
| <OfflineWithFeedback | ||
| onClose={() => ReportActions.clearAllRelatedReportActionErrors(report.reportID, action)} | ||
| onClose={() => { | ||
| const transactionID = ReportActionsUtils.isMoneyRequestAction(action) ? ReportActionsUtils.getOriginalMessage(action)?.IOUTransactionID : undefined; | ||
| if (transactionID) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @daledah, a small problem, do we also need to check if
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no feedback yet, and considering that |
||
| Transaction.clearError(transactionID); | ||
| } | ||
| ReportActions.clearAllRelatedReportActionErrors(report.reportID, action); | ||
| }} | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| pendingAction={ | ||
| draftMessage !== undefined ? undefined : action.pendingAction ?? (action.isOptimisticAction ? CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD : undefined) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB we could declare a function for this to leave the render logic a bit cleaner