fix: get data sub category on modal product

This commit is contained in:
caturbgs
2021-12-22 11:09:21 +07:00
parent a89566adc1
commit 81fffe4528
2 changed files with 16 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
import React, {useContext, useEffect} from "react";
import {Button, Card, Col, Input, Row, Upload,message} from "antd";
import {Button, Card, Col, Input, message, Row, Upload} from "antd";
import {FilterOutlined, PlusSquareOutlined, UploadOutlined,} from "@ant-design/icons";
import {BreadcumbComponent} from "../../component/BreadcumbComponent";
import {useStore} from "../../utils/useStore";
@@ -20,8 +20,8 @@ export const Product = observer(() => {
modalLoader.setLoading(true);
await Promise.allSettled([
store.supplier.getData(),
store.product.getDataCategories(),
store.category.getData(),
store.category.getDataSubCategories(),
]);
await store.product.getData();
modalLoader.setLoading(false);