From 2d9aabfcac271a161abd69fbb54c9869968c470e Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 7 Oct 2021 05:18:47 -0400 Subject: [PATCH] Search: Fix local storage key (#40127) (#40130) * Default to 'General' if no folder title is present * Add bottom padding (cherry picked from commit 5c7e874008748cb552cfe4b8ef682875a5d914cd) Co-authored-by: Alex Khomenko --- public/app/features/search/components/DashboardSearch.tsx | 1 + public/app/features/search/utils.ts | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/public/app/features/search/components/DashboardSearch.tsx b/public/app/features/search/components/DashboardSearch.tsx index b30bf4703f7..2eb6a7f4015 100644 --- a/public/app/features/search/components/DashboardSearch.tsx +++ b/public/app/features/search/components/DashboardSearch.tsx @@ -96,6 +96,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { display: flex; flex-direction: column; height: 100%; + padding-bottom: 24px; `, }; }); diff --git a/public/app/features/search/utils.ts b/public/app/features/search/utils.ts index 91d9d52809f..8a0e986befb 100644 --- a/public/app/features/search/utils.ts +++ b/public/app/features/search/utils.ts @@ -227,10 +227,7 @@ export const getSectionIcon = (section: DashboardSection): IconName => { * Get storage key for a dashboard folder by its title * @param title */ -export const getSectionStorageKey = (title: string) => { - if (!title) { - return ''; - } +export const getSectionStorageKey = (title = 'General') => { return `${SECTION_STORAGE_KEY}.${title.toLowerCase()}`; };