Skip to content

Commit

Permalink
[dashboard] fix Chrome no longer hidden for reports (elastic#206988)
Browse files Browse the repository at this point in the history
Fixes elastic#205794

elastic#196275 removed `setIsVisible`
because https://github.com/elastic/kibana/pull/196275/files#r1811034594.
I could not reproduce the top nav disappearing and reappearing issue.

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 583b852)
  • Loading branch information
nreese committed Jan 20, 2025
1 parent 85caa94 commit a15c1db
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ export function InternalDashboardTopNav({
dashboardTitleRef.current?.focus();
}, [title, viewMode]);

/*
* Manage chrome visibility when dashboard is in print mode.
*/
useEffect(() => {
if (!embedSettings && viewMode === 'print') coreServices.chrome.setIsVisible(false);
}, [embedSettings, viewMode]);

/**
* populate recently accessed, and set is chrome visible.
*/
Expand Down

0 comments on commit a15c1db

Please sign in to comment.