File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
arroyo-console/src/routes/connections Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,12 @@ function SelectWidget({
162162 value : string ;
163163 onChange : ( e : React . ChangeEvent < any > ) => void ;
164164} ) {
165+ useEffect ( ( ) => {
166+ if ( ! value ) {
167+ onChange ( { target : { name : path , value : options [ 0 ] . value } } ) ;
168+ }
169+ } ) ;
170+
165171 return (
166172 < FormControl isRequired = { required } >
167173 { title && < FormLabel > { title } </ FormLabel > }
@@ -470,7 +476,6 @@ export function FormInner({
470476 key = { key }
471477 title = { property . title || key }
472478 description = { property . description }
473- placeholder = "Select an option"
474479 required = { schema . required ?. includes ( key ) }
475480 options = { property . enum . map ( value => ( {
476481 value : value ! . toString ( ) ,
@@ -551,7 +556,6 @@ export function FormInner({
551556 < Stack p = { 4 } >
552557 < SelectWidget
553558 path = { typeKey }
554- placeholder = "Select an option"
555559 description = { property . description }
556560 required = { schema . required ?. includes ( key ) }
557561 options = { property . oneOf . map ( oneOf => ( {
You can’t perform that action at this time.
0 commit comments