Commit 2a507770 by Torkel Ödegaard

use resetfolder instead so it shows current folder

parent 151b838f
...@@ -132,7 +132,6 @@ export class FolderPickerCtrl { ...@@ -132,7 +132,6 @@ export class FolderPickerCtrl {
private loadInitialValue() { private loadInitialValue() {
const resetFolder = { text: this.initialTitle, value: null }; const resetFolder = { text: this.initialTitle, value: null };
const rootFolder = { text: this.rootName, value: 0 }; const rootFolder = { text: this.rootName, value: 0 };
const emptyFolder = { text: '', value: null };
this.getOptions('').then(result => { this.getOptions('').then(result => {
let folder; let folder;
...@@ -149,7 +148,7 @@ export class FolderPickerCtrl { ...@@ -149,7 +148,7 @@ export class FolderPickerCtrl {
// We shouldn't assign a random folder without the user actively choosing it on a persisted dashboard // We shouldn't assign a random folder without the user actively choosing it on a persisted dashboard
const isPersistedDashBoard = this.dashboardId ? true : false; const isPersistedDashBoard = this.dashboardId ? true : false;
if (isPersistedDashBoard) { if (isPersistedDashBoard) {
folder = emptyFolder; folder = resetFolder;
} else { } else {
folder = result.length > 0 ? result[0] : resetFolder; folder = result.length > 0 ? result[0] : resetFolder;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment