From 1df992166665c362ae133c3c092cfdc7cbc19235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 1 May 2020 14:13:22 +0200 Subject: [PATCH] Search: Bring back open search by clicking dashboard name (#24151) (cherry picked from commit 4f81125af01747099e4b0e68d8c6f51ffc906024) --- .../features/dashboard/components/DashNav/DashNav.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/components/DashNav/DashNav.tsx b/public/app/features/dashboard/components/DashNav/DashNav.tsx index a764e366652..38a29c8eb58 100644 --- a/public/app/features/dashboard/components/DashNav/DashNav.tsx +++ b/public/app/features/dashboard/components/DashNav/DashNav.tsx @@ -106,6 +106,13 @@ class DashNav extends PureComponent { this.forceUpdate(); }; + onDashboardNameClick = () => { + this.props.updateLocation({ + query: { search: 'open' }, + partial: true, + }); + }; + addCustomContent(actions: DashNavButtonModel[], buttons: ReactNode[]) { actions.map((action, index) => { const Component = action.component; @@ -186,7 +193,7 @@ class DashNav extends PureComponent { )} - {dashboard.title} + {dashboard.title}
{this.renderLeftActionsButton()}