mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 10:11:06 +00:00
[Navigation Tree] Prevent showing "no items" while still loading (#3341)
* no showing "no items" if still loading * added additional no items variable to handle dictionary composition loading race conditions * code cleanup * more descript variable name
This commit is contained in:
parent
efd97de743
commit
91d1681698
@ -76,7 +76,7 @@
|
|||||||
@expanded="handleExpanded"
|
@expanded="handleExpanded"
|
||||||
/>
|
/>
|
||||||
<li
|
<li
|
||||||
v-if="visibleItems.length === 0"
|
v-if="visibleItems.length === 0 && !noVisibleItems"
|
||||||
:style="emptyStyles()"
|
:style="emptyStyles()"
|
||||||
class="c-tree__item c-tree__item--empty"
|
class="c-tree__item c-tree__item--empty"
|
||||||
>
|
>
|
||||||
@ -140,7 +140,8 @@ export default {
|
|||||||
getChildHeight: false,
|
getChildHeight: false,
|
||||||
settingChildrenHeight: false,
|
settingChildrenHeight: false,
|
||||||
isMobile: isMobile.mobileName,
|
isMobile: isMobile.mobileName,
|
||||||
multipleRootChildren: false
|
multipleRootChildren: false,
|
||||||
|
noVisibleItems: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -318,6 +319,7 @@ export default {
|
|||||||
this.noScroll = true;
|
this.noScroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.noVisibleItems = false;
|
||||||
this.updatevisibleItems();
|
this.updatevisibleItems();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -565,6 +567,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.noVisibleItems = true;
|
||||||
this.visibleItems = [];
|
this.visibleItems = [];
|
||||||
await this.$nextTick(); // prevents "ghost" image of visibleItems
|
await this.$nextTick(); // prevents "ghost" image of visibleItems
|
||||||
this.childrenSlideClass = 'slide-left';
|
this.childrenSlideClass = 'slide-left';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user