feat: rewrite component use effect

This commit is contained in:
caturbgs
2021-12-20 13:32:08 +07:00
parent 2e0eb03d3a
commit f89a1620db
6 changed files with 48 additions and 111 deletions

View File

@@ -149,7 +149,6 @@ export const ProductComponent = observer((props) => {
const handleRemoveFilter = async () => {
store.product.filterSupplier = null;
store.product.filterCategory = null;
store.product.filterSubCategory = null;
setFilterSupplier(null);
setFilterCategories(null);
@@ -167,7 +166,6 @@ export const ProductComponent = observer((props) => {
const handleSubmitFilter = async () => {
store.product.filterSupplier = filterSupplier;
store.product.filterCategory = filterCategories;
store.product.filterSubCategory = filterSubCategories;
await store.product.getData();
store.product.visibleModalFilterProduct = false;