File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/connect-react/src/components Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1- import { useId , useEffect } from "react" ;
1+ import { useId } from "react" ;
22import Select from "react-select" ;
33import { useComponents } from "../hooks/use-components" ;
44import { AppResponse , V1Component } from "@pipedream/sdk" ;
@@ -22,6 +22,8 @@ export function SelectComponent({
2222 componentType,
2323 } ) ;
2424
25+ const selectedValue = components ?. find ( ( c ) => c . key === value ?. key ) || null ;
26+
2527 return (
2628 < Select
2729 instanceId = { instanceId }
@@ -30,7 +32,7 @@ export function SelectComponent({
3032 options = { components }
3133 getOptionLabel = { ( o ) => o . name || o . key }
3234 getOptionValue = { ( o ) => o . key }
33- value = { value }
35+ value = { selectedValue }
3436 onChange = { ( o ) => onChange ?.( ( o as V1Component ) || undefined ) }
3537 isLoading = { isLoading }
3638 components = { {
You can’t perform that action at this time.
0 commit comments