diff --git a/.changeset/breezy-suns-marry.md b/.changeset/breezy-suns-marry.md new file mode 100644 index 0000000000..6c8bac757a --- /dev/null +++ b/.changeset/breezy-suns-marry.md @@ -0,0 +1,5 @@ +--- +"@medusajs/admin-ui": patch +--- + +fix(admin-ui): Fixes an issue where using the bulk editor with comma as the decimal separator would convert the input to NaN diff --git a/packages/admin-ui/ui/src/domain/pricing/forms/price-list-product-prices-form/price-list-product-prices-form.tsx b/packages/admin-ui/ui/src/domain/pricing/forms/price-list-product-prices-form/price-list-product-prices-form.tsx index 5066e98b3e..845b3b2359 100644 --- a/packages/admin-ui/ui/src/domain/pricing/forms/price-list-product-prices-form/price-list-product-prices-form.tsx +++ b/packages/admin-ui/ui/src/domain/pricing/forms/price-list-product-prices-form/price-list-product-prices-form.tsx @@ -1511,7 +1511,7 @@ const PriceListProductPricesForm = ({ ref={tableRef} > - +
{t( @@ -1586,7 +1586,7 @@ const PriceListProductPricesForm = ({ - +
@@ -1828,7 +1828,7 @@ const Cell = React.forwardRef( */ const formattedValue = strippedValue ? formatValue({ - value: strippedValue, + value: strippedValue.replace(/,/g, "."), // If the current locale uses commas as decimal separators, then we need to replace them with dots. decimalScale: decimalScale ?? 0, disableGroupSeparators: true, }) @@ -2138,7 +2138,7 @@ const Cell = React.forwardRef( {borders.bottom && borders.right && (
)}