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

This commit is contained in:
pengchongfu 2017-04-12 10:19:09 +08:00 committed by baiyaaaaa
parent d7d4310d0a
commit ceccf51793

View File

@ -189,7 +189,7 @@ export default class TreeStore {
_setCheckedKeys(key, leafOnly = false, checkedKeys) {
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);
allNodes.forEach((node) => {