@@ -6,7 +6,7 @@ import lodash from "lodash"
66import { useFunctionSuggestions } from "@edition/function/hooks/Function.suggestion.hook" ;
77import { DataTypeInputValueComponent } from "@edition/datatype/components/inputs/DataTypeInputValueComponent" ;
88import { SuggestionDialogComponent } from "@edition/function/components/suggestion/SuggestionDialogComponent" ;
9- import { Flow , LiteralValue , NodeFunction , ReferenceValue , SubFlowValue } from "@code0-tech/sagittarius-graphql-types" ;
9+ import { Flow , LiteralValue , ReferenceValue , SubFlowValue } from "@code0-tech/sagittarius-graphql-types" ;
1010import { FlowService } from "@edition/flow/services/Flow.service" ;
1111import { useParams } from "next/navigation" ;
1212
@@ -31,11 +31,11 @@ export const DataTypeSubFlowInputComponent: React.FC<DataTypeSubFlowInputCompone
3131 const [ suggestionDialogOpen , setSuggestionDialogOpen ] = React . useState ( false )
3232 const result = useFunctionSuggestions ( )
3333
34- const onChangeDebounced = useDebouncedCallback ( ( value : LiteralValue | SubFlowValue | ReferenceValue | NodeFunction | null ) => {
34+ const onChangeDebounced = useDebouncedCallback ( ( value : LiteralValue | SubFlowValue | ReferenceValue | null ) => {
3535 onChange ?.( value ?? null )
3636 } , 200 )
3737
38- return React . useMemo ( ( ) => < >
38+ return < >
3939 < SuggestionDialogComponent suggestions = { [ ...suggestions ! , ...result ] }
4040 open = { suggestionDialogOpen }
4141 onSuggestionSelect = { value => {
@@ -47,7 +47,7 @@ export const DataTypeSubFlowInputComponent: React.FC<DataTypeSubFlowInputCompone
4747 }
4848 }
4949 formValidation ?. setValue ?.( value ?? null )
50- onChangeDebounced ( value as NodeFunction )
50+ onChangeDebounced ( value as SubFlowValue )
5151 } }
5252 onOpenChange = { setSuggestionDialogOpen } />
5353 < InputLabel > { title } </ InputLabel >
@@ -69,11 +69,11 @@ export const DataTypeSubFlowInputComponent: React.FC<DataTypeSubFlowInputCompone
6969 }
7070 }
7171 formValidation ?. setValue ?.( value ?? null )
72- onChangeDebounced ( value ?? null )
72+ onChangeDebounced ( value as SubFlowValue )
7373 } }
7474 suggestions = { suggestions }
7575 formValidation = { formValidation } >
7676 < Text > Select next node</ Text >
7777 </ DataTypeInputValueComponent >
78- </ > , [ formValidation , defaultValue , suggestionDialogOpen ] )
78+ </ >
7979}
0 commit comments