The issue has been closed
Describe the bug / 问题描述
The updateNodeData in the website example does not take effect without using updateNodeData in local vue projects
Reproduction link / 重现链接
https://g6.antv.antgroup.com/examples/behavior/inner-event/#basic
Steps to Reproduce the Bug or Issue / 重现步骤
No response
G6 Version / G6 版本
🆕 5.x
Operating System / 操作系统
Windows
Browser / 浏览器
Chrome
Additional context / 补充说明
No response

The updateNodeData in the website example does not effect local vue project have effect
posted by HHH-bot-code 6 months ago
Could you please provide more details about your problem
posted by Aarebecca 6 months ago
Could you please provide more details about your problem
Click no effect

posted by HHH-bot-code 5 months ago
There is a bug in the example, you can refer to the following code modification, we will fix it as soon as possible:
graph.on(NodeEvent.CLICK, (event) => {
const { target, originalTarget } = event;
console.log('click', originalTarget);
if (originalTarget.className === 'light') { // use className
graph.updateNodeData([{ id: target.id, states: ['selected'], style: { labelText: 'Clicked!' } }]);
graph.draw();
}
});
posted by Aarebecca 5 months ago