File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -97,10 +97,11 @@ const DxcSelect = forwardRef<RefType, SelectPropsType>(
9797 const handleSelectChangeValue = ( newOption : ListOptionType | undefined ) => {
9898 if ( newOption ) {
9999 const currentValue = value ?? innerValue ;
100+ // TODO: Fix types
100101 const newValue = multiple
101- ? Array . isArray ( currentValue ) && currentValue . includes ( newOption . value )
102- ? currentValue . filter ( ( optionVal : string ) => optionVal !== newOption . value )
103- : [ ...currentValue , newOption . value ]
102+ ? ( currentValue as string [ ] ) . includes ( newOption . value )
103+ ? ( currentValue as string [ ] ) . filter ( ( optionVal : string ) => optionVal !== newOption . value )
104+ : [ ...( currentValue as string [ ] ) , newOption . value ]
104105 : newOption . value ;
105106
106107 if ( value == null ) {
You can’t perform that action at this time.
0 commit comments