From 563a9ab4391bf5a9c12559d7ee4d6e4aee341738 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:27:57 +0000 Subject: [PATCH] Explore: Fix closing split pane when logs panel is used (#45602) (#45609) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Clear cache when LogsNavigation is mounted * Update docs (cherry picked from commit 25f155a44d29c933654631609be014b96e9241ea) Co-authored-by: Piotr Jamróz --- public/app/features/explore/LogsNavigation.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/explore/LogsNavigation.tsx b/public/app/features/explore/LogsNavigation.tsx index 29007e21b2a..73dd0a540d9 100644 --- a/public/app/features/explore/LogsNavigation.tsx +++ b/public/app/features/explore/LogsNavigation.tsx @@ -81,8 +81,8 @@ function LogsNavigation({ }, [visibleRange, absoluteRange, logsSortOrder, queries, clearCache, addResultsToCache]); useEffect(() => { - return () => clearCache(); - // We can't enforce the eslint rule here because we only want to run when component unmounts. + clearCache(); + // We can't enforce the eslint rule here because we only want to run when component is mounted. // eslint-disable-next-line react-hooks/exhaustive-deps }, []);