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