diff --git a/src/pages/EditReportFieldDropdown.tsx b/src/pages/EditReportFieldDropdown.tsx index e8364d7d1f37..4d01240f54f3 100644 --- a/src/pages/EditReportFieldDropdown.tsx +++ b/src/pages/EditReportFieldDropdown.tsx @@ -20,10 +20,6 @@ type EditReportFieldDropdownPageComponentProps = { /** Key of the policy report field */ fieldKey: string; - /** ID of the policy this report field belongs to */ - // eslint-disable-next-line react/no-unused-prop-types - policyID: string; - /** Options of the policy report field */ fieldOptions: string[]; @@ -31,9 +27,7 @@ type EditReportFieldDropdownPageComponentProps = { onSubmit: (form: Record) => void; }; -type EditReportFieldDropdownPageProps = EditReportFieldDropdownPageComponentProps; - -function EditReportFieldDropdownPage({onSubmit, fieldKey, fieldValue, fieldOptions}: EditReportFieldDropdownPageProps) { +function EditReportFieldDropdownPage({onSubmit, fieldKey, fieldValue, fieldOptions}: EditReportFieldDropdownPageComponentProps) { const [recentlyUsedReportFields] = useOnyx(ONYXKEYS.RECENTLY_USED_REPORT_FIELDS); const [searchValue, debouncedSearchValue, setSearchValue] = useDebouncedState(''); const theme = useTheme(); diff --git a/src/pages/EditReportFieldPage.tsx b/src/pages/EditReportFieldPage.tsx index 1a082310ff53..e429cc8681be 100644 --- a/src/pages/EditReportFieldPage.tsx +++ b/src/pages/EditReportFieldPage.tsx @@ -68,7 +68,9 @@ function EditReportFieldPage({route}: EditReportFieldPageProps) { ReportActions.updateReportName(report.reportID, value, report.reportName ?? ''); goBack(); } else { - ReportActions.updateReportField(report.reportID, {...reportField, value: value === '' ? null : value}, reportField); + if (value !== '') { + ReportActions.updateReportField(report.reportID, {...reportField, value}, reportField); + } Navigation.dismissModal(isSearchTopmostCentralPane() ? undefined : report?.reportID); } }; @@ -139,7 +141,6 @@ function EditReportFieldPage({route}: EditReportFieldPageProps) { {reportField.type === 'dropdown' && ( !policyField.disabledOptions.at(index))}