File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ const FeatureSelect: React.FC<SignupFormMultiSelectProps> = ({
9898 ( opt : FeatureInterface ) => opt . id !== id ,
9999 ) ;
100100 }
101+ // Update filteredOptions immediately
102+ setFilteredOptions ( filterOptions ( value , updated ) ) ;
101103 return updated ;
102104 } ) ;
103105 }
@@ -193,10 +195,13 @@ const FeatureSelect: React.FC<SignupFormMultiSelectProps> = ({
193195 ) ;
194196 if ( alreadyIndex !== - 1 ) newGroup . splice ( alreadyIndex , 1 ) ;
195197 newGroup . splice ( insertIndex , 0 , option ) ;
196- setOptions ( {
198+ const updatedOptions = {
197199 ...options ,
198200 [ groupKey ] : newGroup ,
199- } ) ;
201+ } ;
202+ setOptions ( updatedOptions ) ;
203+ // Update filteredOptions immediately
204+ setFilteredOptions ( filterOptions ( value , updatedOptions ) ) ;
200205 }
201206 }
202207 }
You can’t perform that action at this time.
0 commit comments