Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: eliminate potential for infinte loop

Brad Barbinafe65f5de591
diff --git a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
index 425cd401e7..63c07e4327 100644
--- a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
+++ b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
@@ -592,7 +592,8 @@ const ProductionPlanningTable = memo(
}
});
return initialMap;
- }, [data, periods]);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [data]);
// Store orders in a map keyed by item id
const [ordersMap, setOrdersMap] =
@@ -600,7 +601,8 @@ const ProductionPlanningTable = memo(
useEffect(() => {
setOrdersMap(getOrders());
- }, [data, periods, getOrders]);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [data]);
const onBulkUpdate = useCallback(
(selectedRows: typeof data, action: "order") => {