You've already forked DataMate
fix(annotation): 修复模板配置树编辑器组件渲染问题
- 为 Tree 组件添加 key 属性以确保正确的组件实例化 - 启用 defaultExpandAll 属性以默认展开所有节点 - 保持拖拽功能在结构锁定状态下的正常工作
This commit is contained in:
@@ -707,11 +707,13 @@ const TemplateConfigurationTreeEditor = ({
|
||||
<Alert message={parseError} type="error" showIcon style={{ marginBottom: 8 }} />
|
||||
)}
|
||||
<Tree
|
||||
key={tree.id}
|
||||
treeData={treeData}
|
||||
selectedKeys={[selectedId]}
|
||||
onSelect={(keys) => {
|
||||
if (keys.length > 0) setSelectedId(String(keys[0]));
|
||||
}}
|
||||
defaultExpandAll
|
||||
draggable={!isStructureLocked}
|
||||
onDrop={onDrop}
|
||||
blockNode
|
||||
|
||||
Reference in New Issue
Block a user