summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/components/notes_app.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/notes/components/notes_app.vue')
-rw-r--r--app/assets/javascripts/notes/components/notes_app.vue12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/components/notes_app.vue b/app/assets/javascripts/notes/components/notes_app.vue
index 9c2ff2c3e7f..7bb1a1a1bfe 100644
--- a/app/assets/javascripts/notes/components/notes_app.vue
+++ b/app/assets/javascripts/notes/components/notes_app.vue
@@ -126,6 +126,9 @@ export default {
slotKeys() {
return this.sortDirDesc ? ['form', 'comments'] : ['comments', 'form'];
},
+ isAppReady() {
+ return !this.isLoading && !this.renderSkeleton && this.shouldShow;
+ },
},
watch: {
async isFetching() {
@@ -149,6 +152,15 @@ export default {
this.discussionsCount.textContent = val;
}
},
+ isAppReady: {
+ handler(isReady) {
+ if (!isReady) return;
+ this.$nextTick(() => {
+ window.mrTabs?.eventHub.$emit('NotesAppReady');
+ });
+ },
+ immediate: true,
+ },
},
created() {
this.discussionsCount = document.querySelector('.js-discussions-count');