Explore: Fix closing split pane when logs panel is used (#45602) (#45609)

* Clear cache when LogsNavigation is mounted

* Update docs

(cherry picked from commit 25f155a44d)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2022-02-21 12:27:57 +01:00
committed by GitHub
co-authored by Piotr Jamróz
parent 6edfc5f9b3
commit 563a9ab439
@@ -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
}, []);