diff --git a/packages/app-builder/src/components/Edit/EditAstNode.tsx b/packages/app-builder/src/components/Edit/EditAstNode.tsx index e7cf73e1a..c3a085a10 100644 --- a/packages/app-builder/src/components/Edit/EditAstNode.tsx +++ b/packages/app-builder/src/components/Edit/EditAstNode.tsx @@ -22,45 +22,58 @@ export function EditAstNode({ name }: { name: string }) { return ( ( -
-
- ( - - - - - - - )} - /> - ( - - - - - - )} - /> - ( - - - - - - - )} - /> + render={({ fieldState: { error } }) => { + const isParentError = !!error?.type; + + return ( +
+
+ ( + + + + + + + )} + /> + ( + + + + + + )} + /> + ( + + + + + + + )} + /> +
+
- -
- )} + ); + }} /> ); } @@ -72,8 +85,9 @@ const EditOperand = forwardRef< value: AstNode; onChange: (value: AstNode) => void; onBlur: () => void; + invalid: boolean; } ->(({ onChange, onBlur, value }, ref) => { +>(({ onChange, onBlur, value, invalid }, ref) => { const editorIdentifier = useEditorIdentifiers(); const getIdentifierOptions = useGetIdentifierOptions(); const selectedItem = value @@ -98,6 +112,7 @@ const EditOperand = forwardRef<
item?.label ?? ''} onChange={(event) => setInputValue(event.target.value)} onBlur={onBlur} @@ -126,8 +141,9 @@ const EditOperator = forwardRef< value: string | null; onChange: (value: string | null) => void; onBlur: () => void; + invalid: boolean; } ->(({ name, value, onChange, onBlur }, ref) => { +>(({ name, value, onChange, onBlur, invalid }, ref) => { const operators = useEditorOperators(); const getOperatorName = useGetOperatorName(); @@ -141,7 +157,8 @@ const EditOperator = forwardRef< >