From 38981bc119bdd5f3f33fda4e3f302a8e340e04c0 Mon Sep 17 00:00:00 2001 From: Dysto coder Date: Mon, 8 Jul 2024 19:01:02 +0300 Subject: [PATCH] Navigate back to details page when editing report title --- src/pages/EditReportFieldPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/EditReportFieldPage.tsx b/src/pages/EditReportFieldPage.tsx index 69f959d6545f..d489e58493d3 100644 --- a/src/pages/EditReportFieldPage.tsx +++ b/src/pages/EditReportFieldPage.tsx @@ -77,11 +77,11 @@ function EditReportFieldPage({route, policy, report}: EditReportFieldPageProps) const value = form[fieldKey]; if (isReportFieldTitle) { ReportActions.updateReportName(report.reportID, value, report.reportName ?? ''); + Navigation.goBack(); } else { ReportActions.updateReportField(report.reportID, {...reportField, value: value === '' ? null : value}, reportField); + Navigation.dismissModal(report?.reportID); } - - Navigation.dismissModal(report?.reportID); }; const handleReportFieldDelete = () => {