fix(editor): fix for menu collapse lag when loading a credentials page (#4329)

🐛 Fixing a menu collapse bug on credentials view
This commit is contained in:
Milorad FIlipović
2022-10-12 18:18:06 +02:00
committed by GitHub
parent 1811c54917
commit 298c4f20a9
2 changed files with 4 additions and 5 deletions

View File

@@ -281,9 +281,6 @@ export default mixins(
if (this.$refs.user) {
this.$externalHooks().run('mainSidebar.mounted', { userRef: this.$refs.user });
}
if (window.innerWidth > 900 && !this.isNodeView) {
this.$store.commit('ui/expandSidebarMenu');
}
this.checkWidthAndAdjustSidebar(window.innerWidth);
await Vue.nextTick();
this.fullyExpanded = !this.isCollapsed;
@@ -457,8 +454,10 @@ export default mixins(
this.checkWidthAndAdjustSidebar(browserWidth);
},
checkWidthAndAdjustSidebar (width: number) {
if (width < 900) {
if (width < 900 || this.isNodeView) {
this.$store.commit('ui/collapseSidebarMenu');
} else {
this.$store.commit('ui/expandSidebarMenu');
}
},
},