Compare commits

...

6 Commits

Author SHA1 Message Date
Michael Rogers
4c672e074e Merge branch 'mct4463' of github.com:nasa/openmct into mct4463 2021-11-17 14:32:28 -06:00
Michael Rogers
3319322bc6 Merge github.com:nasa/openmct into mct4463 2021-11-17 14:31:53 -06:00
Michael Rogers
f5943512da Added line break 2021-11-17 14:31:19 -06:00
Michael Rogers
c57d659cb5 Merge branch 'master' into mct4463 2021-11-17 13:19:16 -06:00
Michael Rogers
4a9af38491 Whitespace 2021-11-17 10:44:05 -06:00
Michael Rogers
c0c35d6e8c Adjusted name of sort method 2021-11-17 10:41:56 -06:00

View File

@@ -432,7 +432,7 @@ export default {
return scrollTopAmount >= treeStart && scrollTopAmount < treeEnd;
},
sortNameDescending(a, b) {
sortNameAscending(a, b) {
// sorting tree children items
if (!(a.name && b.name)) {
if (a.object.name > b.object.name) {
@@ -463,7 +463,7 @@ export default {
const isNestedInMyItems = Boolean(parentObjectPath.find(path => path.identifier.key === 'mine'));
if (SORT_MY_ITEMS_ALPH_ASC && isNestedInMyItems) {
const sortedComposition = composition.sort(this.sortNameDescending);
const sortedComposition = composition.sort(this.sortNameAscending);
composition = sortedComposition;
}
@@ -518,7 +518,7 @@ export default {
const isNestedInMyItems = Boolean(parentItem.objectPath && parentItem.objectPath.find(path => path.identifier.key === 'mine'));
if (SORT_MY_ITEMS_ALPH_ASC && isNestedInMyItems) {
this.sortTreeComposition(this.sortNameDescending, navigationPath);
this.sortTreeComposition(this.sortNameAscending, navigationPath);
}
};
},
@@ -557,7 +557,7 @@ export default {
const allDescendants = this.getChildrenInTreeFor(parentItem);
const sortedChildren = allDescendants.sort(algorithem);
this.treeItems.splice(parentIndex + 1, allDescendants.length, ...sortedChildren);
this.treeItems.splice(parentIndex + 1, sortedChildren.length, ...sortedChildren);
},
addItemToTreeAfter(addItem, afterItem) {
const addIndex = this.getTreeItemIndex(afterItem.navigationPath);