The issue has been closed

collapse-expand
交互会去处理节点数据中的 children 字段,请先检查数据中是否包含此字段
interface NodeData {
id: ID;
type: string;
data?: Record<string, unknown>;
children?: ID[];
}
posted by yvonneyx 6 months ago
posted by halaproliu 6 months ago 
直接加交互肯定是没办法生效的呀,需要再处理一下数据~
posted by yvonneyx 6 months ago
直接加交互肯定是没办法生效的呀,需要再处理一下数据~
其实相当于是,如果数据结构是带children的,插件会自动处理。但是如果没有带的话,需要自己通过onCollpse和onExpand函数去处理吧?
posted by halaproliu 6 months ago
无论是使用内置的 collapse-expand
交互,还是使用 graph API expandElement
和 collapseElement
,都需要消费 children 字段,以告知哪些元素需要被展开或收起。否则,从数据层面很难推断出需要展开或收起的元素。
posted by yvonneyx 6 months ago
无论是使用内置的 collapse-expand
交互,还是使用 graph API expandElement
和 collapseElement
,都需要消费 children 字段,以告知哪些元素需要被展开或收起。否则,从数据层面很难推断出需要展开或收起的元素。
目前dagre布局,所使用的data结构是GraphData类型的,是否意味着这种布局无法使用collapse-expand组件?
posted by halaproliu 6 months ago
posted by yvonneyx 6 months ago 
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 天,现已自动关闭。如需重新打开此问题,请提供所缺失的信息。。
posted by github-actions[bot] 4 months ago