From 9ec865e1eba51d74530121724c222fc6273e0334 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Tue, 20 Jul 2021 15:47:27 +0200 Subject: [PATCH] set the doc title when navigating to reporting and unset when navigating away --- 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 fcbc4662c6e59..44ecc01bd1eb3 100644 --- a/x-pack/plugins/reporting/public/plugin.ts +++ b/x-pack/plugins/reporting/public/plugin.ts @@ -158,7 +158,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$, @@ -167,6 +171,11 @@ export class ReportingPublicPlugin share.url, params ); + + return () => { + docTitle.reset(); + umountAppCallback(); + }; }, });