@@ -419,8 +419,6 @@ const multiTags = (function () {
419
419
export const MultiTagsComp = withExposingConfigs (
420
420
multiTags ,
421
421
[
422
- new NameConfig ( "options" , "Current tags array" ) ,
423
- new NameConfig ( "runtimeOptions" , "Runtime tags array" ) ,
424
422
depsConfig ( {
425
423
name :"selectedTag" ,
426
424
desc :"Currently selected tag data" ,
@@ -441,7 +439,7 @@ export const MultiTagsComp = withExposingConfigs(
441
439
func :( input ) => input . selectedTagIndex
442
440
} ) ,
443
441
depsConfig ( {
444
- name :"selectedTagLabel" ,
442
+ name :"selectedTagLabel" ,
445
443
desc :"Label of currently selected tag" ,
446
444
depKeys :[ "selectedTagIndex" , "runtimeOptions" ] ,
447
445
func :( input ) => {
@@ -452,6 +450,22 @@ export const MultiTagsComp = withExposingConfigs(
452
450
}
453
451
return "" ;
454
452
}
453
+ } ) ,
454
+ depsConfig ( {
455
+ name :"options" ,
456
+ desc :"Current tags array (updates based on editable prop)" ,
457
+ depKeys :[ "options" , "runtimeOptions" , "editable" ] ,
458
+ func :( input ) => {
459
+ const { editable, options, runtimeOptions} = input ;
460
+
461
+ // If not editable, always use the original props.options
462
+ if ( ! editable ) {
463
+ return Array . isArray ( options ) ?options :[ ] ;
464
+ }
465
+
466
+ // If editable, use runtimeOptions (user modifications)
467
+ return Array . isArray ( runtimeOptions ) ?runtimeOptions :[ ] ;
468
+ }
455
469
} )
456
470
]
457
471
) ;