Skip to content

Commit 9d2418f

Browse files
fix(spreadsheet): updates on big modifications (#3360)
Signed-off-by: Joris Mancini <[email protected]>
1 parent dc8e533 commit 9d2418f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/components/spreadsheet-view/hooks/use-update-equipments-on-notification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function useUpdateEquipmentsOnNotification() {
4646
return;
4747
}
4848
const impactedSpreadsheetEquipmentsTypes = impactedElementTypes.filter((type) =>
49-
Object.keys(allEquipments).includes(type)
49+
Object.keys(allEquipments.equipments).includes(type)
5050
);
5151
if (impactedSpreadsheetEquipmentsTypes.length > 0) {
5252
dispatch(

src/components/spreadsheet-view/spreadsheet/spreadsheet-content/spreadsheet-content.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ export const SpreadsheetContent = memo(
8282
if (active && nodesIds.length > 0 && Object.keys(equipments.equipmentsByNodeId).length === 0) {
8383
fetchNodesEquipmentData(tableDefinition?.type, new Set(nodesIds));
8484
}
85-
// eslint-disable-next-line react-hooks/exhaustive-deps
86-
}, [active, nodesIds]);
85+
}, [active, nodesIds, equipments.equipmentsByNodeId, fetchNodesEquipmentData, tableDefinition?.type]);
8786

8887
const { onModelUpdated } = useGridCalculations(gridRef, tableDefinition.uuid, columns);
8988

0 commit comments

Comments
 (0)