array reference check & node ui (#3100)
This commit is contained in:
@@ -62,6 +62,7 @@ const ListItem = ({
|
|||||||
position={'relative'}
|
position={'relative'}
|
||||||
transform={snapshot.isDragging ? `scale(${getZoom()})` : ''}
|
transform={snapshot.isDragging ? `scale(${getZoom()})` : ''}
|
||||||
transformOrigin={'top left'}
|
transformOrigin={'top left'}
|
||||||
|
mb={2}
|
||||||
>
|
>
|
||||||
<Container w={snapshot.isDragging ? '' : 'full'} className="nodrag">
|
<Container w={snapshot.isDragging ? '' : 'full'} className="nodrag">
|
||||||
<Flex mb={4} alignItems={'center'}>
|
<Flex mb={4} alignItems={'center'}>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const NodeIfElse = ({ data, selected }: NodeProps<FlowNodeItemType>) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<NodeCard selected={selected} maxW={'1000px'} {...data}>
|
<NodeCard selected={selected} maxW={'1000px'} {...data}>
|
||||||
<Flex flexDirection={'column'} cursor={'default'} gap={2}>
|
<Flex flexDirection={'column'} cursor={'default'}>
|
||||||
<DndDrag<IfElseListItemType>
|
<DndDrag<IfElseListItemType>
|
||||||
onDragEndCb={(list: IfElseListItemType[]) => onUpdateIfElseList(list)}
|
onDragEndCb={(list: IfElseListItemType[]) => onUpdateIfElseList(list)}
|
||||||
dataList={ifElseList}
|
dataList={ifElseList}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ const NodeVariableUpdate = ({ data, selected }: NodeProps<FlowNodeItemType>) =>
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container key={index} mt={4} w={'full'} mx={0}>
|
<Container key={index} w={'full'} mx={0}>
|
||||||
<Flex alignItems={'center'}>
|
<Flex alignItems={'center'}>
|
||||||
<Flex w={'60px'}>{t('common:core.workflow.variable')}</Flex>
|
<Flex w={'60px'}>{t('common:core.workflow.variable')}</Flex>
|
||||||
<VariableSelector
|
<VariableSelector
|
||||||
@@ -268,11 +268,11 @@ const NodeVariableUpdate = ({ data, selected }: NodeProps<FlowNodeItemType>) =>
|
|||||||
return (
|
return (
|
||||||
<NodeCard selected={selected} maxW={'1000px'} {...data}>
|
<NodeCard selected={selected} maxW={'1000px'} {...data}>
|
||||||
<Box px={4} pb={4}>
|
<Box px={4} pb={4}>
|
||||||
<>
|
<Flex flexDirection={'column'} gap={4}>
|
||||||
{updateList.map((updateItem, index) => (
|
{updateList.map((updateItem, index) => (
|
||||||
<ValueRender key={index} updateItem={updateItem} index={index} />
|
<ValueRender key={index} updateItem={updateItem} index={index} />
|
||||||
))}
|
))}
|
||||||
</>
|
</Flex>
|
||||||
<Flex
|
<Flex
|
||||||
className="nodrag"
|
className="nodrag"
|
||||||
cursor={'default'}
|
cursor={'default'}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ const JsonEditor = ({ inputs = [], item, nodeId }: RenderInputProps) => {
|
|||||||
}
|
}
|
||||||
return JSON.stringify(item.value, null, 2);
|
return JSON.stringify(item.value, null, 2);
|
||||||
}, [item.value]);
|
}, [item.value]);
|
||||||
console.log(12121);
|
|
||||||
return (
|
return (
|
||||||
<JSONEditor
|
<JSONEditor
|
||||||
className="nowheel"
|
className="nowheel"
|
||||||
|
|||||||
@@ -412,7 +412,8 @@ export const checkWorkflowNodeAndConnection = ({
|
|||||||
if (input.required && (!input.value || input.value.length === 0)) {
|
if (input.required && (!input.value || input.value.length === 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return isValidArrayReferenceValue(input.value, nodeIds);
|
|
||||||
|
return input.required && !isValidArrayReferenceValue(input.value, nodeIds);
|
||||||
}
|
}
|
||||||
return input.required && !isValidReferenceValue(input.value, nodeIds);
|
return input.required && !isValidReferenceValue(input.value, nodeIds);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user