diff --git a/src/plugins/folderView/FolderGridView.js b/src/plugins/folderView/FolderGridView.js
index e8b4149d04..e8b43090ae 100644
--- a/src/plugins/folderView/FolderGridView.js
+++ b/src/plugins/folderView/FolderGridView.js
@@ -30,7 +30,7 @@ define([
function FolderGridView(openmct) {
return {
key: 'grid',
- name: 'Grid Vue',
+ name: 'Grid View',
cssClass: 'icon-thumbs-strip',
canView: function (domainObject) {
return domainObject.type === 'folder';
diff --git a/src/plugins/folderView/FolderListView.js b/src/plugins/folderView/FolderListView.js
index d1b93c0004..a7b7257450 100644
--- a/src/plugins/folderView/FolderListView.js
+++ b/src/plugins/folderView/FolderListView.js
@@ -32,7 +32,7 @@ define([
function FolderListView(openmct) {
return {
key: 'list-view',
- name: 'List Vue',
+ name: 'List View',
cssClass: 'icon-list-view',
canView: function (domainObject) {
return domainObject.type === 'folder';
diff --git a/src/plugins/folderView/components/ListView.vue b/src/plugins/folderView/components/ListView.vue
index 1058fa84f4..15f2bc77d4 100644
--- a/src/plugins/folderView/components/ListView.vue
+++ b/src/plugins/folderView/components/ListView.vue
@@ -42,7 +42,8 @@
-
@@ -99,9 +100,20 @@ export default {
mixins: [compositionLoader],
inject: ['domainObject', 'openmct'],
data() {
+ let sortBy = 'model.name',
+ ascending = true,
+ persistedSortOrder = window.localStorage.getItem('openmct-listview-sort-order');
+
+ if (persistedSortOrder) {
+ let parsed = JSON.parse(persistedSortOrder);
+
+ sortBy = parsed.sortBy;
+ ascending = parsed.ascending;
+ }
+
return {
- sortBy: 'model.name',
- ascending: true
+ sortBy,
+ ascending
};
},
computed: {
@@ -121,6 +133,17 @@ export default {
this.sortBy = field;
this.ascending = defaultDirection;
}
+
+ window.localStorage
+ .setItem(
+ 'openmct-listview-sort-order',
+ JSON.stringify(
+ {
+ sortBy: this.sortBy,
+ ascending: this.ascending
+ }
+ )
+ );
}
}
}
diff --git a/src/plugins/folderView/components/composition-loader.js b/src/plugins/folderView/components/composition-loader.js
index 9c368a08b1..5d8de5349f 100644
--- a/src/plugins/folderView/components/composition-loader.js
+++ b/src/plugins/folderView/components/composition-loader.js
@@ -35,7 +35,8 @@ export default {
model: child,
type: type.definition,
isAlias: this.domainObject.identifier.key !== child.location,
- objectPath: [child].concat(openmct.router.path)
+ objectPath: [child].concat(this.openmct.router.path),
+ objectKeyString: this.openmct.objects.makeKeyString(child.identifier)
});
},
remove(identifier) {