@@ -21,6 +21,8 @@ import HorizontalToolbar from './horizontal-toolbar';
21
21
import { openDiagram , setToggleOptions } from '../redux/actions.js' ;
22
22
import { useDispatch , useSelector } from 'react-redux' ;
23
23
import { StudyDisplayMode } from './network-modification.type' ;
24
+ import { useNodeAliases } from './spreadsheet-view/hooks/use-node-aliases.js' ;
25
+ import { useUpdateEquipmentsOnNotification } from './spreadsheet-view/hooks/use-update-equipments-on-notification.js' ;
24
26
25
27
const styles = {
26
28
tabsContainer : ( theme ) => {
@@ -89,6 +91,9 @@ const StudyPane = ({
89
91
90
92
const handleTableEquipmentChanged = useCallback ( ( newTableEquipment ) => setTableEquipment ( newTableEquipment ) , [ ] ) ;
91
93
94
+ const { nodeAliases } = useNodeAliases ( ) ;
95
+ useUpdateEquipmentsOnNotification ( nodeAliases ) ;
96
+
92
97
return (
93
98
< Box sx = { styles . paneContainer } >
94
99
< HorizontalToolbar />
@@ -109,9 +114,9 @@ const StudyPane = ({
109
114
showGrid = { showGrid }
110
115
/>
111
116
</ div >
112
- { /* This TabPanelLazy is used on a multi-node component so we don't want to reset it at each node change ,
113
- so we don't specify a key */ }
114
- < TabPanelLazy selected = { view === StudyView . SPREADSHEET } >
117
+ { /* using a key in these TabPanelLazy because we can change the nodeUuid in these components ,
118
+ and we want to reset the components at each node change */ }
119
+ < TabPanelLazy key = { `spreadsheet- ${ currentNode ?. id } ` } selected = { view === StudyView . SPREADSHEET } >
115
120
< SpreadsheetView
116
121
studyUuid = { studyUuid }
117
122
currentNode = { currentNode }
@@ -122,8 +127,6 @@ const StudyPane = ({
122
127
openDiagram = { openVoltageLevelDiagram }
123
128
/>
124
129
</ TabPanelLazy >
125
- { /* using a key in these TabPanelLazy because we can change the nodeUuid in this component,
126
- and we want to reset the component at each node change*/ }
127
130
< TabPanelLazy key = { `results-${ currentNode ?. id } ` } selected = { view === StudyView . RESULTS } >
128
131
< ResultViewTab
129
132
studyUuid = { studyUuid }
@@ -134,13 +137,9 @@ const StudyPane = ({
134
137
view = { view }
135
138
/>
136
139
</ TabPanelLazy >
137
- { /* using a key in these TabPanelLazy because we can change the nodeUuid in this component,
138
- and we want to reset the component at each node change*/ }
139
140
< TabPanelLazy selected = { view === StudyView . LOGS } key = { `logs-${ currentNode ?. id } ` } >
140
141
< ReportViewerTab visible = { view === StudyView . LOGS } currentNode = { currentNode } disabled = { disabled } />
141
142
</ TabPanelLazy >
142
- { /* using a key in these TabPanelLazy because we can change the nodeUuid in this component,
143
- and we want to reset the component at each node change*/ }
144
143
< TabPanelLazy key = { `parameters-${ currentNode ?. id } ` } selected = { view === StudyView . PARAMETERS } >
145
144
< ParametersTabs view = { view } />
146
145
</ TabPanelLazy >
0 commit comments