From 7f3e8387262ed89283c606d2f9b78e3e245b5623 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Fri, 29 Mar 2024 17:10:36 +0200 Subject: [PATCH] fix: posts sorting on sidebar Fix wrong sorting when a user creates several posts without the page reloading. --- src/discussions/posts/PostsList.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discussions/posts/PostsList.jsx b/src/discussions/posts/PostsList.jsx index c181d2f9d..12eb3f2c6 100644 --- a/src/discussions/posts/PostsList.jsx +++ b/src/discussions/posts/PostsList.jsx @@ -61,7 +61,7 @@ const PostsList = ({ if (topicsIds !== undefined && configStatus === RequestStatus.SUCCESSFUL) { loadThreads(topicsIds); } - }, [courseId, filters, orderBy, page, JSON.stringify(topicsIds), configStatus]); + }, [courseId, filters, orderBy, page, JSON.stringify(topicsIds), configStatus, JSON.stringify(sortedPostsIds)]); useEffect(() => { if (isTopicTab) {