Skip to content

Commit

Permalink
refactor(roundingPrecision): default to empty instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlago99 committed Nov 5, 2024
1 parent 81b4c08 commit 606a712
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/CreateBillableMetric.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const CreateBillableMetric = () => {
? AggregateOnTab.CustomExpression
: AggregateOnTab.UniqueField,
roundingFunction: billableMetric?.roundingFunction || undefined,
roundingPrecision: billableMetric?.roundingPrecision || 0,
roundingPrecision: billableMetric?.roundingPrecision || undefined,
},
validationSchema: object().shape({
name: string().required(''),
Expand Down Expand Up @@ -621,7 +621,6 @@ const CreateBillableMetric = () => {
startIcon="plus"
onClick={() => {
formikProps.setFieldValue('roundingFunction', null)
formikProps.setFieldValue('roundingPrecision', 0)
}}
>
{translate('text_173055464264877451cjmqa1')}
Expand Down Expand Up @@ -689,7 +688,7 @@ const CreateBillableMetric = () => {
e.stopPropagation()

formikProps.setFieldValue('roundingFunction', undefined)
formikProps.setFieldValue('roundingPrecision', 0)
formikProps.setFieldValue('roundingPrecision', undefined)
}}
/>
</div>
Expand Down

0 comments on commit 606a712

Please sign in to comment.