From 26b741fb2f09fca3f585853ec6ec3944e61348af Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Wed, 21 Jul 2021 09:12:41 +0200 Subject: [PATCH] set the doc title when navigating to reporting and unset when navigating away (#106253) --- x-pack/plugins/reporting/public/plugin.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/reporting/public/plugin.ts b/x-pack/plugins/reporting/public/plugin.ts index a2881af902072..c5b40369824db 100644 --- a/x-pack/plugins/reporting/public/plugin.ts +++ b/x-pack/plugins/reporting/public/plugin.ts @@ -153,7 +153,11 @@ export class ReportingPublicPlugin getStartServices(), import('./management/mount_management_section'), ]); - return await mountManagementSection( + const { + chrome: { docTitle }, + } = start; + docTitle.change(this.title); + const umountAppCallback = await mountManagementSection( core, start, license$, @@ -161,6 +165,11 @@ export class ReportingPublicPlugin apiClient, params ); + + return () => { + docTitle.reset(); + umountAppCallback(); + }; }, });