fix(dashboard): Allow using enter key to create newline in Textarea (#9913)
* fix(dashboard):Allow using enter key to create newline in Textarea * update scheam file
This commit is contained in:
committed by
GitHub
parent
c0368cca28
commit
d19d7a66ff
+8
-2
@@ -1,4 +1,4 @@
|
||||
import { Button, Input, Select, Text, Textarea } from "@medusajs/ui"
|
||||
import { Button, Input, Select, Text, Textarea, toast } from "@medusajs/ui"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import * as zod from "zod"
|
||||
|
||||
@@ -69,9 +69,15 @@ export const EditProductForm = ({ product }: EditProductFormProps) => {
|
||||
...nullableData,
|
||||
},
|
||||
{
|
||||
onSuccess: () => {
|
||||
onSuccess: ({ product }) => {
|
||||
toast.success(
|
||||
t("products.edit.successToast", { title: product.title })
|
||||
)
|
||||
handleSuccess()
|
||||
},
|
||||
onError: (e) => {
|
||||
toast.error(e.message)
|
||||
},
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
@@ -23,8 +23,11 @@ export const ProductEdit = () => {
|
||||
<RouteDrawer>
|
||||
<RouteDrawer.Header>
|
||||
<RouteDrawer.Title asChild>
|
||||
<Heading>{t("products.editProduct")}</Heading>
|
||||
<Heading>{t("products.edit.header")}</Heading>
|
||||
</RouteDrawer.Title>
|
||||
<RouteDrawer.Description className="sr-only">
|
||||
{t("products.edit.description")}
|
||||
</RouteDrawer.Description>
|
||||
</RouteDrawer.Header>
|
||||
{!isLoading && product && <EditProductForm product={product} />}
|
||||
</RouteDrawer>
|
||||
|
||||
Reference in New Issue
Block a user