fix(web): iteration node‘s variableList updated
This commit is contained in:
@@ -33,7 +33,7 @@ const LoopNode: ReactShapeConfig['component'] = ({ node, graph }) => {
|
|||||||
y: cycleStartBBox.y,
|
y: cycleStartBBox.y,
|
||||||
data: {
|
data: {
|
||||||
type: 'add-node',
|
type: 'add-node',
|
||||||
label: '添加节点',
|
label: t('workflow.addNode'),
|
||||||
icon: '+',
|
icon: '+',
|
||||||
parentId: node.id,
|
parentId: node.id,
|
||||||
cycle: data.id,
|
cycle: data.id,
|
||||||
@@ -97,7 +97,7 @@ const LoopNode: ReactShapeConfig['component'] = ({ node, graph }) => {
|
|||||||
y: centerY,
|
y: centerY,
|
||||||
data: {
|
data: {
|
||||||
type: 'add-node',
|
type: 'add-node',
|
||||||
label: '添加节点',
|
label: t('workflow.addNode'),
|
||||||
icon: '+',
|
icon: '+',
|
||||||
parentId: node.id,
|
parentId: node.id,
|
||||||
cycle: data.id,
|
cycle: data.id,
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ const VariableSelect: FC<VariableSelectProps> = ({
|
|||||||
showSearch
|
showSearch
|
||||||
allowClear={allowClear}
|
allowClear={allowClear}
|
||||||
filterOption={(input, option) => {
|
filterOption={(input, option) => {
|
||||||
|
if (input === '/') return true;
|
||||||
if (option?.options) {
|
if (option?.options) {
|
||||||
return option.label?.toLowerCase().includes(input.toLowerCase()) ||
|
return option.label?.toLowerCase().includes(input.toLowerCase()) ||
|
||||||
option.options.some((opt: any) =>
|
option.options.some((opt: any) =>
|
||||||
|
|||||||
@@ -1068,7 +1068,7 @@ const Properties: FC<PropertiesProps> = ({
|
|||||||
(Array.isArray(config.filterNodeTypes) && config.filterNodeTypes.includes(variable.nodeData?.type));
|
(Array.isArray(config.filterNodeTypes) && config.filterNodeTypes.includes(variable.nodeData?.type));
|
||||||
const variableNameMatch = !config.filterVariableNames ||
|
const variableNameMatch = !config.filterVariableNames ||
|
||||||
(Array.isArray(config.filterVariableNames) && config.filterVariableNames.includes(variable.label));
|
(Array.isArray(config.filterVariableNames) && config.filterVariableNames.includes(variable.label));
|
||||||
return nodeTypeMatch && variableNameMatch;
|
return nodeTypeMatch || variableNameMatch;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Filter child nodes for iteration output
|
// Filter child nodes for iteration output
|
||||||
|
|||||||
Reference in New Issue
Block a user