Skip to content

Commit e0d60e4

Browse files
author
昔梦
committed
fix:修复节点面板node.data问题
1 parent 3c1ab3e commit e0d60e4

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

  • packages/x-flow/src/components/NodeEditor

packages/x-flow/src/components/NodeEditor/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ const NodeEditor: FC<INodeEditorProps> = (props: any) => {
2727
const [asyncSchema, setAsyncSchema] = useState<Schema>({});
2828

2929
async function getSchema() {
30-
const shema = await getSettingSchema(id, nodeType,nodeSetting,data,form).catch(() => ({}));
30+
const shema = await getSettingSchema(
31+
id,
32+
nodeType,
33+
nodeSetting,
34+
data,
35+
form
36+
).catch(() => ({}));
3137
setAsyncSchema(shema);
3238
}
3339
useEffect(() => {
@@ -88,8 +94,8 @@ const NodeEditor: FC<INodeEditorProps> = (props: any) => {
8894
}
8995
});
9096
}
91-
const { _nodeType, _status } = node?.data;
92-
node.data = { _nodeType, _status, ...data }; // form-render的list如果为空,不会返回list相应的字段,只能全部替换data
97+
const { _nodeType, _status, _isCandidate, title, desc } = node?.data;
98+
node.data = { _nodeType, _status, _isCandidate, title, desc, ...data }; // form-render的list如果为空,不会返回list相应的字段,只能全部替换data
9399
}
94100
});
95101
setNodes(newNodes, false);

0 commit comments

Comments
 (0)