From 5fff041e8a42ed7094806df85d9c3088ec939725 Mon Sep 17 00:00:00 2001 From: kavin Date: Thu, 10 Oct 2019 10:06:12 +0800 Subject: [PATCH] fix(#19132): fix component tree defaultExpandAll does not work when using treeData --- components/tree/DirectoryTree.tsx | 17 +++++++++++++++-- components/tree/util.ts | 9 +++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/components/tree/DirectoryTree.tsx b/components/tree/DirectoryTree.tsx index bce268a8a1..803221f74e 100644 --- a/components/tree/DirectoryTree.tsx +++ b/components/tree/DirectoryTree.tsx @@ -13,7 +13,12 @@ import Tree, { AntTreeNodeSelectedEvent, AntTreeNode, } from './Tree'; -import { calcRangeKeys, getFullKeyList, convertDirectoryKeysToNodes } from './util'; +import { + calcRangeKeys, + getFullKeyList, + convertDirectoryKeysToNodes, + getFullKeyListByTreeData, +} from './util'; import Icon from '../icon'; export type ExpandAction = false | 'click' | 'doubleClick'; @@ -82,7 +87,15 @@ class DirectoryTree extends React.Component