fix(admin): Price input (#4530)
* initial fix for number inputs * add changeset
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import * as React from "react"
|
||||
import { CurrencyType } from "../../../utils/currencies"
|
||||
|
||||
import PriceInput, { PriceInputProps } from "../price-input"
|
||||
|
||||
import { CurrencyType } from "../../../utils/currencies"
|
||||
|
||||
type MedusaPriceInputProps = {
|
||||
amount: number
|
||||
currency: CurrencyType
|
||||
@@ -34,7 +36,7 @@ function MedusaPriceInput(props: MedusaPriceInputProps) {
|
||||
const numericalValue = Math.round(floatValue * 10 ** decimal_digits)
|
||||
onChange(numericalValue)
|
||||
} else {
|
||||
onChange(undefined)
|
||||
onChange(null)
|
||||
}
|
||||
setRawValue(value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user