mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: 修复 Tree 在拖拽后item使用旧的key导致的渲染异常 (#6043)
This commit is contained in:
parent
d0f56f4a71
commit
0340ca00a2
@ -112,4 +112,4 @@
|
||||
"printBasicPrototype": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -846,13 +846,13 @@ export class TreeSelector extends React.Component<
|
||||
}
|
||||
if (paths.length === 1) {
|
||||
// 父节点
|
||||
item.key = item.key || key;
|
||||
item.key = key;
|
||||
flattenedOptions.push(item);
|
||||
} else if (this.isUnfolded(parent)) {
|
||||
this.relations.set(item, parent);
|
||||
// 父节点是展开的状态
|
||||
item.level = level;
|
||||
item.key = item.key || `${parent.key}-${key}`;
|
||||
item.key = `${parent.key}-${key}`;
|
||||
flattenedOptions.push(item);
|
||||
}
|
||||
}
|
||||
|
@ -236,4 +236,4 @@
|
||||
"react-dom": ">=16.8.6"
|
||||
},
|
||||
"gitHead": "37d23b4a8eb1c663bc38e8dd9040889ea1526ec4"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user