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.

Revert "fix: highlight item in parts bom"

Brad Barbin9781e14b5cfc
diff --git a/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx b/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
index 655c70b3b5..af21c613cf 100644
--- a/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BoMExplorer.tsx
@@ -113,7 +113,6 @@ const BoMExplorer = ({
if (!itemId) throw new Error("itemId not found");
if (!methodId) throw new Error("methodId not found");
- // biome-ignore lint/correctness/useExhaustiveDependencies: methods and selectNode cause re-renders
useEffect(() => {
if (selectedMaterialId) {
const node = methods.find(
@@ -129,16 +128,8 @@ const BoMExplorer = ({
if (node) {
selectNode(node.id);
}
- } else if (params.methodId) {
- // On initial load at the root manufacturing route, select the root method
- const node = methods.find(
- (m) => m.data.materialMakeMethodId === params.methodId
- );
- if (node) {
- selectNode(node.id);
- }
}
- }, [selectedMaterialId, params.makeMethodId, params.methodId]);
+ }, [selectedMaterialId, params.makeMethodId, methods, selectNode]);
const importBomDisclosure = useDisclosure();