File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
packages/connect-react/src Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ import { InternalField } from "./InternalField";
1313import { Alert } from "./Alert" ;
1414import { ErrorBoundary } from "./ErrorBoundary" ;
1515import { ControlSubmit } from "./ControlSubmit" ;
16- import type { ConfigurableProp } from "@pipedream/sdk" ;
16+ import type {
17+ ConfigurableProp , ConfigurablePropAlert ,
18+ } from "@pipedream/sdk" ;
1719
1820export function InternalComponentForm ( ) {
1921 const formContext = useFormContext ( ) ;
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ export const FormContextProvider = <T extends ConfigurableProps>({
102102 ] = useState < Record < string , string > [ ] > ( [ ] )
103103
104104 const [
105- enableDebugging ,
106- setEnableDebugging ,
105+ enableDebugging
106+ ,
107107 ] = useState < boolean > ( __enableDebugging === true )
108108
109109 const [
@@ -464,6 +464,7 @@ export const FormContextProvider = <T extends ConfigurableProps>({
464464 message,
465465 } as Record < string , string > )
466466 }
467+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
467468 } catch ( e ) {
468469 // pass
469470 }
@@ -498,10 +499,11 @@ export const FormContextProvider = <T extends ConfigurableProps>({
498499 if ( data && "observations" in data ) {
499500 const obs = data . observations || [ ]
500501 if ( obs && obs . length > 0 ) {
502+ const res = obs . filter ( ( it ) => it . k === "error" )
503+ ?. map ( handleObservationErrors )
504+ ?. filter ( ( e ) => e !== undefined ) || [ ]
501505 newErrors . push (
502- ...obs ?. filter ( ( it ) => it . k === "error" )
503- . map ( handleObservationErrors )
504- . filter ( ( e ) => e !== undefined ) ,
506+ ...res ,
505507 )
506508 }
507509 } else if ( data && "error" in data && "details" in data ) {
@@ -516,6 +518,7 @@ export const FormContextProvider = <T extends ConfigurableProps>({
516518 // })
517519 } )
518520 }
521+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
519522 } catch ( e ) {
520523 // pass
521524 }
You can’t perform that action at this time.
0 commit comments