From 2a507770019ce103d1dc4cdeafa2def8c0b92135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 22 Jan 2019 17:41:36 +0100 Subject: [PATCH] use resetfolder instead so it shows current folder --- public/app/features/dashboard/folder_picker/folder_picker.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/app/features/dashboard/folder_picker/folder_picker.ts b/public/app/features/dashboard/folder_picker/folder_picker.ts index 11fab840278..0896b3c793c 100644 --- a/public/app/features/dashboard/folder_picker/folder_picker.ts +++ b/public/app/features/dashboard/folder_picker/folder_picker.ts @@ -132,7 +132,6 @@ export class FolderPickerCtrl { private loadInitialValue() { const resetFolder = { text: this.initialTitle, value: null }; const rootFolder = { text: this.rootName, value: 0 }; - const emptyFolder = { text: '', value: null }; this.getOptions('').then(result => { let folder; @@ -149,7 +148,7 @@ export class FolderPickerCtrl { // We shouldn't assign a random folder without the user actively choosing it on a persisted dashboard const isPersistedDashBoard = this.dashboardId ? true : false; if (isPersistedDashBoard) { - folder = emptyFolder; + folder = resetFolder; } else { folder = result.length > 0 ? result[0] : resetFolder; }