Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nasa/openmct.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie V <jamie.j.vigliotta@nasa.gov>2021-06-04 20:57:01 +0300
committerGitHub <noreply@github.com>2021-06-04 20:57:01 +0300
commitf602790b1de0a01f8b7414e9812a3a29e0105112 (patch)
tree7e67ce744d828bd01e7793f0170c14f400f954ae
parent66893cd5db06a9102c38b88ef6ebe9928ab6e73e (diff)
[Navigation Tree] Fix composition on closed folders and scrolling for items NOT in tree (#3920)v1.7.3
-rw-r--r--src/ui/layout/mct-tree.vue17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/ui/layout/mct-tree.vue b/src/ui/layout/mct-tree.vue
index c9e5071c3..a541612bd 100644
--- a/src/ui/layout/mct-tree.vue
+++ b/src/ui/layout/mct-tree.vue
@@ -308,6 +308,7 @@ export default {
|| !checkItem.navigationPath.includes(path);
});
this.openTreeItems.splice(pathIndex, 1);
+ this.removeCompositionListenerFor(path);
},
closeTreeItem(item) {
this.closeTreeItemByPath(item.navigationPath);
@@ -393,12 +394,18 @@ export default {
}
const indexOfScroll = this.treeItems.findIndex(item => item.navigationPath === navigationPath);
- const scrollTopAmount = indexOfScroll * this.itemHeight;
- this.$refs.scrollable.scrollTo({
- top: scrollTopAmount,
- behavior: 'smooth'
- });
+ if (indexOfScroll !== -1) {
+ const scrollTopAmount = indexOfScroll * this.itemHeight;
+
+ this.$refs.scrollable.scrollTo({
+ top: scrollTopAmount,
+ behavior: 'smooth'
+ });
+ } else if (this.scrollToPath) {
+ this.scrollToPath = undefined;
+ delete this.scrollToPath;
+ }
},
scrollEndEvent() {
this.$nextTick(() => {