From 5c7e874008748cb552cfe4b8ef682875a5d914cd Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Thu, 7 Oct 2021 11:35:31 +0300 Subject: [PATCH] Search: Fix local storage key (#40127) * Default to 'General' if no folder title is present * Add bottom padding --- 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 381f89c635c..90a973c2b31 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: GrafanaTheme2) => { display: flex; flex-direction: column; height: 100%; + padding-bottom: ${theme.spacing(3)}; `, }; }); 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()}`; };