File tree Expand file tree Collapse file tree 3 files changed +14
-15
lines changed
packages/connect-react/src Expand file tree Collapse file tree 3 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -171,26 +171,16 @@ export function ControlSelect<T>({
171171 if ( o ) {
172172 if ( Array . isArray ( o ) ) {
173173 if ( typeof o [ 0 ] === "object" && "value" in o [ 0 ] ) {
174- const vs = [ ] ;
175- for ( const _o of o ) {
176- if ( prop . withLabel ) {
177- vs . push ( _o ) ;
178- } else {
179- vs . push ( _o . value ) ;
180- }
181- }
182- onChange ( vs ) ;
183- } else {
184- onChange ( o ) ;
185- }
186- } else if ( typeof o === "object" && "value" in o ) {
187- if ( prop . withLabel ) {
188174 onChange ( {
189175 __lv : o ,
190176 } ) ;
191177 } else {
192- onChange ( o . value ) ;
178+ onChange ( o ) ;
193179 }
180+ } else if ( typeof o === "object" && "value" in o ) {
181+ onChange ( {
182+ __lv : o ,
183+ } ) ;
194184 } else {
195185 throw new Error ( "unhandled option type" ) ; // TODO
196186 }
Original file line number Diff line number Diff line change @@ -254,6 +254,12 @@ export const FormContextProvider = <T extends ConfigurableProps>({
254254 setErrors ( _errors ) ;
255255 } ;
256256
257+ useEffect ( ( ) => {
258+ updateConfiguredPropsQueryDisabledIdx ( _configuredProps )
259+ } , [
260+ _configuredProps ,
261+ ] ) ;
262+
257263 useEffect ( ( ) => {
258264 const newConfiguredProps : ConfiguredProps < T > = { } ;
259265 for ( const prop of configurableProps ) {
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ export function valuesFromOptions<T>(value: unknown | T[] | PropOptions<T>): T[]
4040 }
4141 return results
4242 }
43+ if ( value && typeof value === "object" && "__lv" in value && Array . isArray ( value . __lv ) ) {
44+ return value . __lv as T [ ]
45+ }
4346 if ( ! Array . isArray ( value ) )
4447 return [ ]
4548 return value as T [ ]
You can’t perform that action at this time.
0 commit comments