@@ -20,6 +20,7 @@ import {
20
20
typePattern
21
21
} from '../foundation/p-types.js' ;
22
22
import {
23
+ cloneElement ,
23
24
compareNames ,
24
25
ComplexAction ,
25
26
createElement ,
@@ -179,13 +180,13 @@ export function editConnectedApWizard(parent: Element, redundancy?: boolean): Wi
179
180
{
180
181
title : get ( 'protocol104.network.connectedAp.wizard.title.edit' ) ,
181
182
element : parent ,
182
- menuActions : [
183
- {
183
+ menuActions : redundancy
184
+ ? [ {
184
185
icon : 'playlist_add' ,
185
186
label : get ( 'protocol104.network.connectedAp.wizard.addRedundancyGroup' ) ,
186
187
action : openRedundancyGroupWizard ( parent , redundancyGroupNumbers ) ,
187
- } ,
188
- ] ,
188
+ } ]
189
+ : undefined ,
189
190
primary : {
190
191
icon : 'save' ,
191
192
label : get ( 'save' ) ,
@@ -270,14 +271,18 @@ function editConnectedApAction(parent: Element, redundancy?: boolean): WizardAct
270
271
// All redundancy group actions are done in those wizards itself.
271
272
if ( redundancy ) {
272
273
const stationTypeValue = getValue ( inputs . find ( i => i . label === 'StationType' ) ! ) ! ;
273
- const stationTypeElement = oldAddress ?. querySelector ( 'P[type="StationType"]' ) ;
274
- stationTypeElement ! . textContent = stationTypeValue ;
274
+ const originalElement = oldAddress ?. querySelector ( 'P[type="StationType"]' ) ;
275
+
276
+ const elementClone = cloneElement ( originalElement ! , { } ) ;
277
+ elementClone ! . textContent = stationTypeValue ;
275
278
276
279
complexAction . actions . push ( {
277
- new : {
278
- parent : parent ,
279
- element : oldAddress ! ,
280
+ old : {
281
+ element : originalElement !
280
282
} ,
283
+ new : {
284
+ element : elementClone
285
+ }
281
286
} ) ;
282
287
} else if ( oldAddress !== null && ! isEqualAddress ( oldAddress , newAddress ) ) {
283
288
//address & child elements P are changed: cannot use replace editor action
0 commit comments