antvis / XFlow

React component for building interactive diagrams.
https://x6.antv.antgroup.com/xflow/guide/introduction
MIT License
573 stars 235 forks source link

在一个页面使用两次NodeCollapsePanel,获取两组不同的数据并展示 #279

Closed ayaayaayaai closed 2 years ago

ayaayaayaai commented 2 years ago

问题描述

在一个页面中,使用两个NodeCollapsePanel,获取不同的数据,结果只有一个NodeCollapsePanel获取到数据并展示,更改graphMeta,modelService没有效果****

重现链接

https://codesandbox.io/s/ji-chu-shi-yong-forked-k0qfdf?file=/dnd-panel-config.tsx

重现步骤

1.切换tab能够展示不同的节点数据 2.切换tab只能展示先打开的tab里的NodeCollapsePanel中的数据 3.另一个tab中使用该组件获得空数组

预期行为

期望两个NodeCollapsePanel能展示不同数据

平台

屏幕截图或视频(可选)

image image

补充说明(可选)

需要通过切换tab展示不同的节点数据

ayaayaayaai commented 2 years ago

多个相同组件使用同一个Model导致

GageChan commented 1 year ago

多个相同组件使用同一个Model导致

请问大佬有什么方法解决吗?

zhangjiana commented 11 months ago

请问解决了吗?