Skip to content

Commit 11f3cd4

Browse files
committed
Fix ecommerce editing
1 parent a3b7f83 commit 11f3cd4

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
# [2.3.2] - 20/07/2022
4+
5+
- Fix ecommerce editing
6+
37
# [2.3.1] - 18/07/2022
48

59
- Fix users management

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-material-full",
33
"description": "React Material Admin Full",
4-
"version": "2.3.1",
4+
"version": "2.3.2",
55
"private": true,
66
"homepage": "./",
77
"scripts": {

src/pages/ecommerce/CreateProduct.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const CreateProduct = () => {
8989
const editProduct = e => {
9090
setLocalProducts({
9191
...localProducts,
92-
[e.target.id]: e.currentTarget.value
92+
[e.target.id]: e.currentTarget.value.split(' ')
9393
});
9494
};
9595

@@ -102,6 +102,7 @@ const CreateProduct = () => {
102102

103103
const getEditProduct = () => {
104104
updateProduct(localProducts, context.setProducts);
105+
history.push("/app/ecommerce/management");
105106
// sendNotification();
106107
};
107108

@@ -345,6 +346,11 @@ const CreateProduct = () => {
345346
variant="outlined"
346347
placeholder={"Add Tag"}
347348
fullWidth
349+
value={
350+
isCreateProduct
351+
? newProduct.technology.join(' ')
352+
: localProducts.technology.join(' ')
353+
}
348354
onChange={e =>
349355
isCreateProduct ? editNewProduct(e) : editProduct(e)
350356
}

0 commit comments

Comments
 (0)