Skip to content

Commit

Permalink
Merge pull request #51538 from abzokhattab/fix-report-field-initial-v…
Browse files Browse the repository at this point in the history
…alue

Fix report field initial value
  • Loading branch information
MonilBhavsar authored Nov 4, 2024
2 parents 3b77aff + 241e066 commit ef9d902
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/workspace/reportFields/CreateReportFieldsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ function CreateReportFieldsPage({
ReportField.createReportField(policyID, {
name: values[INPUT_IDS.NAME],
type: values[INPUT_IDS.TYPE],
initialValue: values[INPUT_IDS.INITIAL_VALUE],
initialValue: !(values[INPUT_IDS.TYPE] === CONST.REPORT_FIELD_TYPES.LIST && availableListValuesLength === 0) ? values[INPUT_IDS.INITIAL_VALUE] : '',
});
Navigation.goBack();
},
[policyID],
[availableListValuesLength, policyID],
);

const validateForm = useCallback(
Expand Down

0 comments on commit ef9d902

Please sign in to comment.