fix(admin-ui): PriceList bulk editor fixes (#5456)
* fix: rounding on decimal numbers, wrap in form * add changeset * fix: decimal numbers in product details * fix: resolve an issue where double clicking an already selected cell would freeze it
This commit is contained in:
committed by
GitHub
parent
ebba93e03d
commit
ea2ee343f0
6
.changeset/afraid-melons-decide.md
Normal file
6
.changeset/afraid-melons-decide.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/admin-ui": patch
|
||||||
|
"@medusajs/admin": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(admin-ui): PriceList bulk editor fixes
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"i18next-browser-languagedetector": "^7.0.1",
|
"i18next-browser-languagedetector": "^7.0.1",
|
||||||
"i18next-http-backend": "^2.2.1",
|
"i18next-http-backend": "^2.2.1",
|
||||||
"md5": "^2.3.0",
|
"md5": "^2.3.0",
|
||||||
"medusa-react": "^9.0.8",
|
"medusa-react": "^9.0.9",
|
||||||
"mini-css-extract-plugin": "^2.7.6",
|
"mini-css-extract-plugin": "^2.7.6",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
import React, { useEffect, useMemo, useRef, useState } from "react"
|
|
||||||
import { useAdminRegions, useAdminUpdateVariant } from "medusa-react"
|
|
||||||
import { MoneyAmount, Product } from "@medusajs/client-types"
|
import { MoneyAmount, Product } from "@medusajs/client-types"
|
||||||
|
import mapKeys from "lodash/mapKeys"
|
||||||
import pick from "lodash/pick"
|
import pick from "lodash/pick"
|
||||||
import pickBy from "lodash/pickBy"
|
import pickBy from "lodash/pickBy"
|
||||||
import mapKeys from "lodash/mapKeys"
|
import { useAdminRegions, useAdminUpdateVariant } from "medusa-react"
|
||||||
|
import { useEffect, useMemo, useRef, useState } from "react"
|
||||||
|
|
||||||
import { currencies as CURRENCY_MAP } from "../../../../utils/currencies"
|
import { currencies as CURRENCY_MAP } from "../../../../utils/currencies"
|
||||||
|
|
||||||
import Modal from "../../../molecules/modal"
|
import useNotification from "../../../../hooks/use-notification"
|
||||||
import Fade from "../../../atoms/fade-wrapper"
|
import Fade from "../../../atoms/fade-wrapper"
|
||||||
import Button from "../../../fundamentals/button"
|
import Button from "../../../fundamentals/button"
|
||||||
|
import CrossIcon from "../../../fundamentals/icons/cross-icon"
|
||||||
|
import Modal from "../../../molecules/modal"
|
||||||
|
import DeletePrompt from "../../delete-prompt"
|
||||||
|
import EditPricesActions from "./edit-prices-actions"
|
||||||
|
import EditPricesTable from "./edit-prices-table"
|
||||||
|
import SavePrompt from "./save-prompt"
|
||||||
import {
|
import {
|
||||||
getAllProductPricesCurrencies,
|
getAllProductPricesCurrencies,
|
||||||
getAllProductPricesRegions,
|
getAllProductPricesRegions,
|
||||||
getCurrencyPricesOnly,
|
getCurrencyPricesOnly,
|
||||||
getRegionPricesOnly,
|
getRegionPricesOnly,
|
||||||
} from "./utils"
|
} from "./utils"
|
||||||
import CrossIcon from "../../../fundamentals/icons/cross-icon"
|
|
||||||
import EditPricesTable from "./edit-prices-table"
|
|
||||||
import EditPricesActions from "./edit-prices-actions"
|
|
||||||
import useNotification from "../../../../hooks/use-notification"
|
|
||||||
import DeletePrompt from "../../delete-prompt"
|
|
||||||
import SavePrompt from "./save-prompt"
|
|
||||||
|
|
||||||
type EditPricesModalProps = {
|
type EditPricesModalProps = {
|
||||||
close: () => void
|
close: () => void
|
||||||
@@ -194,12 +194,15 @@ function EditPricesModal(props: EditPricesModalProps) {
|
|||||||
|
|
||||||
if (typeof regionPriceEdits[price.region_id] === "number") {
|
if (typeof regionPriceEdits[price.region_id] === "number") {
|
||||||
const p = { ...price }
|
const p = { ...price }
|
||||||
p.amount =
|
const num =
|
||||||
regionPriceEdits[price.region_id]! *
|
regionPriceEdits[price.region_id]! *
|
||||||
Math.pow(
|
Math.pow(
|
||||||
10,
|
10,
|
||||||
CURRENCY_MAP[price.currency_code.toUpperCase()].decimal_digits
|
CURRENCY_MAP[price.currency_code.toUpperCase()].decimal_digits
|
||||||
)
|
)
|
||||||
|
|
||||||
|
p.amount = parseFloat(num.toFixed(0))
|
||||||
|
|
||||||
pricesPayload.push(p)
|
pricesPayload.push(p)
|
||||||
} else {
|
} else {
|
||||||
// amount is unset -> DELETED case just skip
|
// amount is unset -> DELETED case just skip
|
||||||
@@ -217,12 +220,15 @@ function EditPricesModal(props: EditPricesModalProps) {
|
|||||||
|
|
||||||
if (typeof currencyPriceEdits[price.currency_code] === "number") {
|
if (typeof currencyPriceEdits[price.currency_code] === "number") {
|
||||||
const p = { ...price }
|
const p = { ...price }
|
||||||
p.amount =
|
const num =
|
||||||
currencyPriceEdits[price.currency_code] *
|
currencyPriceEdits[price.currency_code] *
|
||||||
Math.pow(
|
Math.pow(
|
||||||
10,
|
10,
|
||||||
CURRENCY_MAP[price.currency_code.toUpperCase()].decimal_digits
|
CURRENCY_MAP[price.currency_code.toUpperCase()].decimal_digits
|
||||||
)
|
)
|
||||||
|
|
||||||
|
p.amount = parseFloat(num.toFixed(0))
|
||||||
|
|
||||||
pricesPayload.push(p)
|
pricesPayload.push(p)
|
||||||
} else {
|
} else {
|
||||||
// amount is unset -> DELETED case just skip
|
// amount is unset -> DELETED case just skip
|
||||||
@@ -237,10 +243,12 @@ function EditPricesModal(props: EditPricesModalProps) {
|
|||||||
|
|
||||||
Object.entries(currencyPriceEdits).forEach(([currency, amount]) => {
|
Object.entries(currencyPriceEdits).forEach(([currency, amount]) => {
|
||||||
if (typeof amount === "number") {
|
if (typeof amount === "number") {
|
||||||
amount *= Math.pow(
|
const num =
|
||||||
10,
|
amount *
|
||||||
CURRENCY_MAP[currency.toUpperCase()].decimal_digits
|
Math.pow(10, CURRENCY_MAP[currency.toUpperCase()].decimal_digits)
|
||||||
)
|
|
||||||
|
amount = parseFloat(num.toFixed(0))
|
||||||
|
|
||||||
pricesPayload.push({ currency_code: currency, amount })
|
pricesPayload.push({ currency_code: currency, amount })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -248,10 +256,13 @@ function EditPricesModal(props: EditPricesModalProps) {
|
|||||||
Object.entries(regionPriceEdits).forEach(([region, amount]) => {
|
Object.entries(regionPriceEdits).forEach(([region, amount]) => {
|
||||||
if (typeof amount === "number") {
|
if (typeof amount === "number") {
|
||||||
const currency = regionCurrenciesMap[region]
|
const currency = regionCurrenciesMap[region]
|
||||||
amount *= Math.pow(
|
|
||||||
10,
|
const num =
|
||||||
CURRENCY_MAP[currency.toUpperCase()].decimal_digits
|
amount *
|
||||||
)
|
Math.pow(10, CURRENCY_MAP[currency.toUpperCase()].decimal_digits)
|
||||||
|
|
||||||
|
amount = parseFloat(num.toFixed(0))
|
||||||
|
|
||||||
pricesPayload.push({ region_id: region, amount })
|
pricesPayload.push({ region_id: region, amount })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -58,8 +58,14 @@ const PriceListEdit = () => {
|
|||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
<PriceListGeneralSection priceList={price_list} />
|
<PriceListGeneralSection
|
||||||
<PriceListPricesSection priceList={price_list} />
|
key={`${price_list.updated_at}`}
|
||||||
|
priceList={price_list}
|
||||||
|
/>
|
||||||
|
<PriceListPricesSection
|
||||||
|
key={`${price_list.updated_at}`}
|
||||||
|
priceList={price_list}
|
||||||
|
/>
|
||||||
{getWidgets("price_list.details.after").map((w, i) => {
|
{getWidgets("price_list.details.after").map((w, i) => {
|
||||||
return (
|
return (
|
||||||
<WidgetContainer
|
<WidgetContainer
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { useForm } from "react-hook-form"
|
|||||||
|
|
||||||
import { zodResolver } from "@hookform/resolvers/zod"
|
import { zodResolver } from "@hookform/resolvers/zod"
|
||||||
import { useTranslation } from "react-i18next"
|
import { useTranslation } from "react-i18next"
|
||||||
|
import { Form } from "../../../../components/helpers/form"
|
||||||
import useNotification from "../../../../hooks/use-notification"
|
import useNotification from "../../../../hooks/use-notification"
|
||||||
import { useFeatureFlag } from "../../../../providers/feature-flag-provider"
|
import { useFeatureFlag } from "../../../../providers/feature-flag-provider"
|
||||||
import { getErrorMessage } from "../../../../utils/error-messages"
|
import { getErrorMessage } from "../../../../utils/error-messages"
|
||||||
@@ -50,6 +51,8 @@ const EditPricesModal = ({
|
|||||||
const [tab, setTab] = React.useState<Tab>(Tab.PRICES)
|
const [tab, setTab] = React.useState<Tab>(Tab.PRICES)
|
||||||
const [product, setProduct] = React.useState<Product | null>(null)
|
const [product, setProduct] = React.useState<Product | null>(null)
|
||||||
|
|
||||||
|
const originalPrices = React.useRef<PriceListPricesSchema | null>(null)
|
||||||
|
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
const promptTitle = t(
|
const promptTitle = t(
|
||||||
@@ -106,6 +109,15 @@ const EditPricesModal = ({
|
|||||||
const { mutateAsync: deleteAsync, isLoading: isDeleting } =
|
const { mutateAsync: deleteAsync, isLoading: isDeleting } =
|
||||||
useAdminDeletePriceListPrices(priceList.id)
|
useAdminDeletePriceListPrices(priceList.id)
|
||||||
|
|
||||||
|
const onCloseModal = React.useCallback(() => {
|
||||||
|
onOpenChange(false)
|
||||||
|
setTab(Tab.PRICES)
|
||||||
|
|
||||||
|
originalPrices.current = null
|
||||||
|
resetProduct()
|
||||||
|
resetPrices()
|
||||||
|
}, [onOpenChange, resetPrices, resetProduct])
|
||||||
|
|
||||||
const onModalStateChange = React.useCallback(
|
const onModalStateChange = React.useCallback(
|
||||||
async (open: boolean) => {
|
async (open: boolean) => {
|
||||||
if (open) {
|
if (open) {
|
||||||
@@ -124,9 +136,10 @@ const EditPricesModal = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpenChange(false)
|
onCloseModal()
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
|
onCloseModal,
|
||||||
prompt,
|
prompt,
|
||||||
onOpenChange,
|
onOpenChange,
|
||||||
isPricesDirty,
|
isPricesDirty,
|
||||||
@@ -196,6 +209,7 @@ const EditPricesModal = ({
|
|||||||
productData.products[product.id!] = productPrices
|
productData.products[product.id!] = productPrices
|
||||||
}
|
}
|
||||||
|
|
||||||
|
originalPrices.current = productData
|
||||||
resetPrices(productData)
|
resetPrices(productData)
|
||||||
}, [
|
}, [
|
||||||
isLoading,
|
isLoading,
|
||||||
@@ -325,6 +339,25 @@ const EditPricesModal = ({
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const originalPrice =
|
||||||
|
originalPrices.current?.products[productId]?.variants[variantId]
|
||||||
|
.currency?.[currencyCode]
|
||||||
|
|
||||||
|
if (originalPrice && originalPrice.id && originalPrice.amount) {
|
||||||
|
const originalDbSafeAmount = getDbSafeAmount(
|
||||||
|
currencyCode,
|
||||||
|
parseFloat(originalPrice.amount)
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the price is the same as the original price,
|
||||||
|
* we don't want to update it.
|
||||||
|
*/
|
||||||
|
if (originalDbSafeAmount === dbSafeAmount) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const payload: PricePayload = {
|
const payload: PricePayload = {
|
||||||
id: id ? id : undefined,
|
id: id ? id : undefined,
|
||||||
amount: dbSafeAmount,
|
amount: dbSafeAmount,
|
||||||
@@ -352,8 +385,12 @@ const EditPricesModal = ({
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const currencyCode = regions.find(
|
||||||
|
(r) => r.id === regionId
|
||||||
|
)!.currency_code
|
||||||
|
|
||||||
const dbSafeAmount = getDbSafeAmount(
|
const dbSafeAmount = getDbSafeAmount(
|
||||||
regions.find((r) => r.id === regionId)!.currency_code,
|
currencyCode,
|
||||||
parseFloat(amount)
|
parseFloat(amount)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -361,6 +398,25 @@ const EditPricesModal = ({
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const originalPrice =
|
||||||
|
originalPrices.current?.products[productId]?.variants[variantId]
|
||||||
|
.region?.[regionId]
|
||||||
|
|
||||||
|
if (originalPrice && originalPrice.id && originalPrice.amount) {
|
||||||
|
const originalDbSafeAmount = getDbSafeAmount(
|
||||||
|
currencyCode,
|
||||||
|
parseFloat(originalPrice.amount)
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the price is the same as the original price,
|
||||||
|
* we don't want to update it.
|
||||||
|
*/
|
||||||
|
if (originalDbSafeAmount === dbSafeAmount) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const payload: PricePayload = {
|
const payload: PricePayload = {
|
||||||
id: id ? id : undefined,
|
id: id ? id : undefined,
|
||||||
amount: dbSafeAmount,
|
amount: dbSafeAmount,
|
||||||
@@ -454,7 +510,7 @@ const EditPricesModal = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpenChange(false)
|
onCloseModal()
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -561,54 +617,56 @@ const EditPricesModal = ({
|
|||||||
</div>
|
</div>
|
||||||
</FocusModal.Header>
|
</FocusModal.Header>
|
||||||
<FocusModal.Body className="h-full w-full overflow-y-auto">
|
<FocusModal.Body className="h-full w-full overflow-y-auto">
|
||||||
{isLoading ? (
|
<Form {...pricesForm}>
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
{isLoading ? (
|
||||||
<Spinner className="text-ui-fg-subtle animate-spin" />
|
<div className="flex h-full w-full items-center justify-center">
|
||||||
</div>
|
<Spinner className="text-ui-fg-subtle animate-spin" />
|
||||||
) : isError || isNotFound ? (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<div className="text-ui-fg-subtle flex items-center gap-x-2">
|
|
||||||
<ExclamationCircle />
|
|
||||||
<Text>
|
|
||||||
{t(
|
|
||||||
"price-list-edit-prices-modal-error-loading",
|
|
||||||
"An error occurred while preparing the form. Reload the page and try again. If the issue persists, try again later."
|
|
||||||
)}
|
|
||||||
</Text>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
) : isError || isNotFound ? (
|
||||||
) : (
|
<div className="flex h-full w-full items-center justify-center">
|
||||||
<React.Fragment>
|
<div className="text-ui-fg-subtle flex items-center gap-x-2">
|
||||||
<ProgressTabs.Content
|
<ExclamationCircle />
|
||||||
value={Tab.PRICES}
|
<Text>
|
||||||
className="h-full w-full"
|
{t(
|
||||||
>
|
"price-list-edit-prices-modal-error-loading",
|
||||||
<PriceListPricesForm
|
"An error occurred while preparing the form. Reload the page and try again. If the issue persists, try again later."
|
||||||
setProduct={onSetProduct}
|
)}
|
||||||
form={nestedForm(pricesForm)}
|
</Text>
|
||||||
priceListId={priceList.id}
|
</div>
|
||||||
productIds={productIds}
|
</div>
|
||||||
/>
|
) : (
|
||||||
</ProgressTabs.Content>
|
<React.Fragment>
|
||||||
{product && (
|
|
||||||
<ProgressTabs.Content
|
<ProgressTabs.Content
|
||||||
value={Tab.EDIT}
|
value={Tab.PRICES}
|
||||||
className="h-full w-full"
|
className="h-full w-full"
|
||||||
>
|
>
|
||||||
<PriceListProductPricesForm
|
<PriceListPricesForm
|
||||||
product={product}
|
setProduct={onSetProduct}
|
||||||
currencies={currencies}
|
form={nestedForm(pricesForm)}
|
||||||
regions={regions}
|
priceListId={priceList.id}
|
||||||
control={productControl}
|
productIds={productIds}
|
||||||
taxInclEnabled={isTaxInclPricesEnabled}
|
|
||||||
priceListTaxInclusive={priceList.includes_tax}
|
|
||||||
getValues={getProductValues}
|
|
||||||
setValue={setProductValue}
|
|
||||||
/>
|
/>
|
||||||
</ProgressTabs.Content>
|
</ProgressTabs.Content>
|
||||||
)}
|
{product && (
|
||||||
</React.Fragment>
|
<ProgressTabs.Content
|
||||||
)}
|
value={Tab.EDIT}
|
||||||
|
className="h-full w-full"
|
||||||
|
>
|
||||||
|
<PriceListProductPricesForm
|
||||||
|
product={product}
|
||||||
|
currencies={currencies}
|
||||||
|
regions={regions}
|
||||||
|
control={productControl}
|
||||||
|
taxInclEnabled={isTaxInclPricesEnabled}
|
||||||
|
priceListTaxInclusive={priceList.includes_tax}
|
||||||
|
getValues={getProductValues}
|
||||||
|
setValue={setProductValue}
|
||||||
|
/>
|
||||||
|
</ProgressTabs.Content>
|
||||||
|
)}
|
||||||
|
</React.Fragment>
|
||||||
|
)}
|
||||||
|
</Form>
|
||||||
</FocusModal.Body>
|
</FocusModal.Body>
|
||||||
</FocusModal.Content>
|
</FocusModal.Content>
|
||||||
</ProgressTabs>
|
</ProgressTabs>
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ export const getDefaultAmount = (code: string, amount?: number) => {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return amount / Math.pow(10, meta.decimal_digits)
|
const num = amount / Math.pow(10, meta.decimal_digits)
|
||||||
|
|
||||||
|
return parseFloat(num.toFixed(meta.decimal_digits))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getDbSafeAmount = (code: string, amount?: number) => {
|
export const getDbSafeAmount = (code: string, amount?: number) => {
|
||||||
@@ -38,5 +40,7 @@ export const getDbSafeAmount = (code: string, amount?: number) => {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return amount * Math.pow(10, meta.decimal_digits)
|
const num = amount * Math.pow(10, meta.decimal_digits)
|
||||||
|
|
||||||
|
return parseFloat(num.toFixed(0))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1852,6 +1852,15 @@ const Cell = React.forwardRef<HTMLInputElement, CellProps>(
|
|||||||
}
|
}
|
||||||
}, [isAnchor, onBlur, setIsEditing])
|
}, [isAnchor, onBlur, setIsEditing])
|
||||||
|
|
||||||
|
const onFocusInput = React.useCallback(() => {
|
||||||
|
inputRef.current?.focus()
|
||||||
|
|
||||||
|
inputRef.current?.setSelectionRange(
|
||||||
|
inputRef.current.value.length,
|
||||||
|
inputRef.current.value.length
|
||||||
|
)
|
||||||
|
}, [])
|
||||||
|
|
||||||
const onMouseDown = React.useCallback(
|
const onMouseDown = React.useCallback(
|
||||||
(e: React.MouseEvent) => {
|
(e: React.MouseEvent) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
@@ -1875,12 +1884,16 @@ const Cell = React.forwardRef<HTMLInputElement, CellProps>(
|
|||||||
if (e.detail === 2) {
|
if (e.detail === 2) {
|
||||||
setIsActive(true)
|
setIsActive(true)
|
||||||
setIsEditing(true)
|
setIsEditing(true)
|
||||||
|
|
||||||
|
onFocusInput()
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onCellMouseDown(e)
|
onCellMouseDown(e)
|
||||||
},
|
},
|
||||||
[onCellMouseDown, setIsEditing, isAnchor, isActive]
|
[onCellMouseDown, setIsEditing, onFocusInput, isAnchor, isActive]
|
||||||
)
|
)
|
||||||
|
|
||||||
const onEnter = React.useCallback(
|
const onEnter = React.useCallback(
|
||||||
@@ -1897,9 +1910,9 @@ const Cell = React.forwardRef<HTMLInputElement, CellProps>(
|
|||||||
setIsActive(true)
|
setIsActive(true)
|
||||||
setIsEditing(true)
|
setIsEditing(true)
|
||||||
|
|
||||||
inputRef.current?.focus()
|
onFocusInput()
|
||||||
},
|
},
|
||||||
[isAnchor, isActive, onNextRow, setIsEditing]
|
[isAnchor, isActive, onNextRow, setIsEditing, onFocusInput]
|
||||||
)
|
)
|
||||||
|
|
||||||
const onSpace = React.useCallback(
|
const onSpace = React.useCallback(
|
||||||
@@ -2006,8 +2019,12 @@ const Cell = React.forwardRef<HTMLInputElement, CellProps>(
|
|||||||
|
|
||||||
inputRef.current?.focus()
|
inputRef.current?.focus()
|
||||||
setIsActive(false)
|
setIsActive(false)
|
||||||
|
|
||||||
|
onBlur()
|
||||||
|
|
||||||
|
return
|
||||||
},
|
},
|
||||||
[isActive]
|
[isActive, onBlur]
|
||||||
)
|
)
|
||||||
|
|
||||||
const onKeydown = React.useCallback(
|
const onKeydown = React.useCallback(
|
||||||
@@ -2045,7 +2062,7 @@ const Cell = React.forwardRef<HTMLInputElement, CellProps>(
|
|||||||
|
|
||||||
const onActiveAwareBlur = React.useCallback(() => {
|
const onActiveAwareBlur = React.useCallback(() => {
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
return
|
setIsActive(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
onBlur()
|
onBlur()
|
||||||
|
|||||||
@@ -6311,7 +6311,7 @@ __metadata:
|
|||||||
i18next-parser: ^8.0.0
|
i18next-parser: ^8.0.0
|
||||||
jest: 25.5.4
|
jest: 25.5.4
|
||||||
md5: ^2.3.0
|
md5: ^2.3.0
|
||||||
medusa-react: ^9.0.8
|
medusa-react: ^9.0.9
|
||||||
mini-css-extract-plugin: ^2.7.6
|
mini-css-extract-plugin: ^2.7.6
|
||||||
moment: ^2.29.4
|
moment: ^2.29.4
|
||||||
path-browserify: ^1.0.1
|
path-browserify: ^1.0.1
|
||||||
@@ -32499,7 +32499,7 @@ __metadata:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"medusa-react@^9.0.6, medusa-react@^9.0.8, medusa-react@workspace:packages/medusa-react":
|
"medusa-react@^9.0.6, medusa-react@^9.0.9, medusa-react@workspace:packages/medusa-react":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "medusa-react@workspace:packages/medusa-react"
|
resolution: "medusa-react@workspace:packages/medusa-react"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user