From b28e091d5dfba038a0bed5709eeead0a71e82525 Mon Sep 17 00:00:00 2001 From: Yulong Date: Thu, 14 Mar 2019 17:11:42 +0800 Subject: [PATCH] [Code] fix a tree expand/collapse problem (#33227) --- .../code/public/components/file_tree/file_tree.tsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/x-pack/plugins/code/public/components/file_tree/file_tree.tsx b/x-pack/plugins/code/public/components/file_tree/file_tree.tsx index bd390665c11d85..947c5cf370068b 100644 --- a/x-pack/plugins/code/public/components/file_tree/file_tree.tsx +++ b/x-pack/plugins/code/public/components/file_tree/file_tree.tsx @@ -37,18 +37,6 @@ interface Props extends RouteComponentProps { } export class CodeFileTree extends React.Component { - public componentDidUpdate(prevProps: Readonly): void { - const { openedPaths, match, treeLoading } = this.props; - const path = match.params.path; - if (path) { - if (prevProps.match.params.path !== path || prevProps.treeLoading !== treeLoading) { - if (!openedPaths.includes(path)) { - this.props.openTreePath(path); - } - } - } - } - public componentDidMount(): void { const { path } = this.props.match.params; if (path) {