File tree Expand file tree Collapse file tree
src/packages/ce/src/datatype/components/inputs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ import {
2020import { Schema } from "@code0-tech/triangulum/dist/util/schema.util" ;
2121
2222export interface DataTypeInputComponentProps extends Omit < InputWrapperProps < NodeParameterValue | NodeFunction > , "onChange" > {
23- schema : ( NodeSchema | Schema ) & { blocked ?: boolean }
23+ schema : ( NodeSchema | Schema )
2424 clearable ?: boolean
25- onChange ?: ( value : ReferenceValue | SubFlowValue | LiteralValue | NodeFunction | undefined ) => void
25+ onChange ?: ( value : ReferenceValue | SubFlowValue | LiteralValue | NodeFunction | null ) => void
2626 suggestions ?: ( NodeFunction | SubFlowValue | ReferenceValue | LiteralValue ) [ ]
2727 onClear ?: ( event : React . MouseEvent < HTMLButtonElement > ) => void
2828}
@@ -31,11 +31,10 @@ export const DataTypeInputComponent: React.FC<DataTypeInputComponentProps> = (pr
3131
3232 const { schema, ...rest } = props
3333
34- const suggestions = "schema" in schema ? schema ?. schema ?. suggestions as ( NodeFunction | ReferenceValue | LiteralValue ) [ ] : [ ]
35- const inputName = "schema" in schema ? ( schema ?. schema ?. input === "generic" ? schema . functionSchema . input : schema ?. schema ?. input ) : schema . input
36- const blocked = schema ?. blocked
34+ const suggestions = "schema" in ( schema ?? { } ) ? ( schema as NodeSchema ) ?. schema ?. suggestions as ( NodeFunction | ReferenceValue | LiteralValue ) [ ] : [ ]
35+ const inputName = "schema" in ( schema ?? { } ) ? ( ( schema as NodeSchema ) ?. schema ?. input === "generic" ? ( schema as NodeSchema ) . functionSchema . input : ( schema as NodeSchema ) ?. schema ?. input ) : ( schema as Schema ) . input
3736
38- if ( blocked ) {
37+ if ( "schema" in ( schema ?? { } ) && ( ( schema as NodeSchema ) . blockedBy ?. length ?? 0 ) > 0 ) {
3938 return null
4039 }
4140
You can’t perform that action at this time.
0 commit comments