Search: Fix local storage key (#40127) (#40130)

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

* Add bottom padding

(cherry picked from commit 5c7e874008)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-10-07 11:18:47 +02:00
committed by GitHub
co-authored by Alex Khomenko
parent 235351ae69
commit 2d9aabfcac
2 changed files with 2 additions and 4 deletions
@@ -96,6 +96,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
display: flex;
flex-direction: column;
height: 100%;
padding-bottom: 24px;
`,
};
});
+1 -4
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()}`;
};