From b56ef1f009984fd6a3320d3511d5a93b5d6149d3 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Wed, 20 Sep 2023 16:08:51 +0200 Subject: [PATCH] :bug: Fix highlight folder --- .../Components/DesignSystem/FolderListContainer/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/front/Components/DesignSystem/FolderListContainer/index.tsx b/src/front/Components/DesignSystem/FolderListContainer/index.tsx index abfeb50a..47af85be 100644 --- a/src/front/Components/DesignSystem/FolderListContainer/index.tsx +++ b/src/front/Components/DesignSystem/FolderListContainer/index.tsx @@ -75,6 +75,11 @@ class FolderListContainerClass extends React.Component { ); } + public override componentDidUpdate(prevProps: Readonly, prevState: Readonly, snapshot?: any): void { + if (prevProps.selectedFolder !== this.props.selectedFolder) { + this.setState({ filteredFolders: this.props.folders, blocks: this.getBlocks(this.props.folders) }); + } + } private getBlocks(folders: OfficeFolder[]): IBlock[] { const pendingFolders = folders .filter((folder) => {