mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Corey Robertson <corey.robertson@elastic.co>
This commit is contained in:
parent
c2530426b8
commit
2ebea58a13
1 changed files with 7 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { useContext, useEffect } from 'react';
|
||||
import useEffectOnce from 'react-use/lib/useEffectOnce';
|
||||
import { usePlatformService } from '../../../services';
|
||||
import { WorkpadRoutingContext } from '..';
|
||||
|
||||
|
@ -27,4 +28,10 @@ export const useFullscreenPresentationHelper = () => {
|
|||
setFullscreen(true);
|
||||
}
|
||||
}, [isFullscreen, setFullscreen]);
|
||||
|
||||
// Remove fullscreen when component unmounts
|
||||
useEffectOnce(() => () => {
|
||||
setFullscreen(true);
|
||||
document.querySelector('body')?.classList.remove(fullscreenClass);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue