@@ -232,7 +232,7 @@ const ParameterField: FC<ParameterFieldProps> = ({
232
232
) ;
233
233
234
234
case "multi-select" : {
235
- const values = parseStringArrayValue ( value ) ;
235
+ const values = parseStringArrayValue ( value ?? "" ) ;
236
236
237
237
// Map parameter options to MultiSelectCombobox options format
238
238
const options : Option [ ] = parameter . options . map ( ( opt ) => ( {
@@ -277,7 +277,7 @@ const ParameterField: FC<ParameterFieldProps> = ({
277
277
}
278
278
279
279
case "tag-select" : {
280
- const values = parseStringArrayValue ( value ) ;
280
+ const values = parseStringArrayValue ( value ?? "" ) ;
281
281
282
282
return (
283
283
< TagInput
@@ -525,8 +525,8 @@ const isValidParameterOption = (
525
525
previewParam : PreviewParameter ,
526
526
buildParam : WorkspaceBuildParameter ,
527
527
) => {
528
+ // multi-select is the only list(string) type with options
528
529
if ( previewParam . form_type === "multi-select" ) {
529
- console . log ( "buildParam.value" , buildParam . value ) ;
530
530
let values : string [ ] = [ ] ;
531
531
try {
532
532
const parsed = JSON . parse ( buildParam . value ) ;
@@ -541,24 +541,24 @@ const isValidParameterOption = (
541
541
return false ;
542
542
}
543
543
544
- // If options exist, validate each value
545
544
if ( previewParam . options . length > 0 ) {
546
545
const validValues = previewParam . options . map (
547
546
( option ) => option . value . value ,
548
547
) ;
549
- return values . every ( ( value ) => validValues . includes ( value ) ) ;
548
+ return values . some ( ( value ) => validValues . includes ( value ) ) ;
550
549
}
551
550
return false ;
552
551
}
553
- // For parameters with options (dropdown, radio, etc.)
552
+
553
+ // For parameters with options (dropdown, radio)
554
554
if ( previewParam . options . length > 0 ) {
555
555
const validValues = previewParam . options . map (
556
556
( option ) => option . value . value ,
557
557
) ;
558
558
return validValues . includes ( buildParam . value ) ;
559
559
}
560
560
561
- // For parameters without options (input, textarea, etc. )
561
+ // For parameters without options (input,textarea,switch,checkbox,tag-select )
562
562
return true ;
563
563
} ;
564
564
0 commit comments