@@ -109,8 +109,9 @@ const StudyPane = ({
109
109
showGrid = { showGrid }
110
110
/>
111
111
</ div >
112
- { /* using a key in these TabPanelLazy because we can change the nodeUuid in this component */ }
113
- < TabPanelLazy key = { `spreadsheet-${ currentNode ?. id } ` } selected = { view === StudyView . SPREADSHEET } >
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 } >
114
115
< SpreadsheetView
115
116
studyUuid = { studyUuid }
116
117
currentNode = { currentNode }
@@ -121,6 +122,8 @@ const StudyPane = ({
121
122
openDiagram = { openVoltageLevelDiagram }
122
123
/>
123
124
</ 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*/ }
124
127
< TabPanelLazy key = { `results-${ currentNode ?. id } ` } selected = { view === StudyView . RESULTS } >
125
128
< ResultViewTab
126
129
studyUuid = { studyUuid }
@@ -131,9 +134,13 @@ const StudyPane = ({
131
134
view = { view }
132
135
/>
133
136
</ 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*/ }
134
139
< TabPanelLazy selected = { view === StudyView . LOGS } key = { `logs-${ currentNode ?. id } ` } >
135
140
< ReportViewerTab visible = { view === StudyView . LOGS } currentNode = { currentNode } disabled = { disabled } />
136
141
</ 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*/ }
137
144
< TabPanelLazy key = { `parameters-${ currentNode ?. id } ` } selected = { view === StudyView . PARAMETERS } >
138
145
< ParametersTabs view = { view } />
139
146
</ TabPanelLazy >
0 commit comments