From 54b85ad5b9591793722ec9e5707868a77583ead0 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Fri, 5 May 2023 17:36:06 +0200 Subject: [PATCH] :bug: Fix blinking folders --- src/front/Components/DesignSystem/FolderList/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/front/Components/DesignSystem/FolderList/index.tsx b/src/front/Components/DesignSystem/FolderList/index.tsx index 188c1dc3..7d67e2c7 100644 --- a/src/front/Components/DesignSystem/FolderList/index.tsx +++ b/src/front/Components/DesignSystem/FolderList/index.tsx @@ -31,6 +31,10 @@ class FolderListClass extends React.Component { {this.props.folders.sort((folder) => { const pendingDocuments = (folder.documents ?? []).filter((document) => document.document_status === EDocumentStatus.DEPOSITED); return pendingDocuments.length >= 1 ? -1 : 1; + }).sort((folder1, folder2) => { + return folder1.created_at! < folder2.created_at! ? -1 : 1; + }).sort((folder1, folder2) => { + return folder1.folder_number! < folder2.folder_number! ? -1 : 1; }).map((folder) => { return (