Search: Fix local storage key (#40127)

* Default to 'General' if no folder title is present

* Add bottom padding
This commit is contained in:
Alex Khomenko 2021-10-07 11:35:31 +03:00 committed by GitHub
parent 95d9722afa
commit 5c7e874008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -96,6 +96,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme2) => {
display: flex;
flex-direction: column;
height: 100%;
padding-bottom: ${theme.spacing(3)};
`,
};
});

View File

@ -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()}`;
};