@@ -419,8 +419,6 @@ const multiTags = (function () {
419419export const MultiTagsComp = withExposingConfigs (
420420 multiTags ,
421421 [
422- new NameConfig ( "options" , "Current tags array" ) ,
423- new NameConfig ( "runtimeOptions" , "Runtime tags array" ) ,
424422 depsConfig ( {
425423 name : "selectedTag" ,
426424 desc : "Currently selected tag data" ,
@@ -441,7 +439,7 @@ export const MultiTagsComp = withExposingConfigs(
441439 func : ( input ) => input . selectedTagIndex
442440 } ) ,
443441 depsConfig ( {
444- name : "selectedTagLabel" ,
442+ name : "selectedTagLabel" ,
445443 desc : "Label of currently selected tag" ,
446444 depKeys : [ "selectedTagIndex" , "runtimeOptions" ] ,
447445 func : ( input ) => {
@@ -452,6 +450,22 @@ export const MultiTagsComp = withExposingConfigs(
452450 }
453451 return "" ;
454452 }
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+ }
455469 } )
456470 ]
457471) ;
0 commit comments