Commit ceccf517 authored by pengchongfu's avatar pengchongfu Committed by baiyaaaaa

Tree: sort correctly, fix #4006 (#4107)

parent d7d4310d
...@@ -189,7 +189,7 @@ export default class TreeStore { ...@@ -189,7 +189,7 @@ export default class TreeStore {
_setCheckedKeys(key, leafOnly = false, checkedKeys) { _setCheckedKeys(key, leafOnly = false, checkedKeys) {
const allNodes = this._getAllNodes(); const allNodes = this._getAllNodes();
allNodes.sort((a, b) => a.level < b.level); allNodes.sort((a, b) => b.level - a.level);
const keys = Object.keys(checkedKeys); const keys = Object.keys(checkedKeys);
allNodes.forEach((node) => { allNodes.forEach((node) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment