Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v5] create-edge will report an error when listening to onCreate when creating an edge #6430

Closed
j787701730 opened this issue Oct 24, 2024 · 2 comments
Labels
behavior Issue about behaviors bug 🐛 Something isn't working need improvement Lack of information or incorrect format v5 waiting for author Further information is requested from the author.

Comments

@j787701730
Copy link

Describe the bug / 问题描述

{ type: 'create-edge', // trigger: 'click', enable: (event) => { console.log(event); return ['node'].includes(event.targetType); }, onCreate() { // isCreateEdgeRef.current = true; }, onFinish(e) {} }

报错信息如下:
data.ts:49 Uncaught (in promise) TypeError: Cannot destructure property 'data' of 'data' as it is undefined. at cloneElementData (data.ts:49:17) at DataController.pushChange (data.ts:83:34) at data.ts:349:14 at Array.map (<anonymous>) at DataController.addEdgeData (data.ts:348:13) at _Graph.addEdgeData (graph.ts:706:24) at _CreateEdge.createEdge (create-edge.ts:178:11) at _CreateEdge.<anonymous> (create-edge.ts:123:12) at Generator.next (<anonymous>) at collapse-expand.ts:64:26

image

Reproduction link / 重现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Edge

Additional context / 补充说明

No response

@github-actions github-actions bot changed the title 【v5】create-edge创建边时监听onCreate时会报错 [v5] create-edge will report an error when listening to onCreate when creating an edge Oct 24, 2024
@yvonneyx yvonneyx added bug 🐛 Something isn't working v5 behavior Issue about behaviors labels Oct 24, 2024
@yvonneyx yvonneyx added need improvement Lack of information or incorrect format waiting for author Further information is requested from the author. labels Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

Please provide more information, or use the standard format, otherwise we will not process this issue.
Reference document:


请提供更多信息,或者使用规范的格式,否则我们不会处理这个 issue。
参考文档:

Copy link

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. | 由于该 issue 缺少关键信息且已闲置 7 天,现已自动关闭。如需重新打开此问题,请提供所缺失的信息。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior Issue about behaviors bug 🐛 Something isn't working need improvement Lack of information or incorrect format v5 waiting for author Further information is requested from the author.
Projects
None yet
Development

No branches or pull requests

2 participants