From c9e8c618f50a88898478d46b61292c57bb50646d Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 6 Jun 2018 11:31:48 +0100 Subject: fixed dropdown not re-showing the content --- app/assets/javascripts/ide/components/ide_side_bar.vue | 13 ++++++------- .../javascripts/ide/components/merge_requests/item.vue | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/ide/components/ide_side_bar.vue b/app/assets/javascripts/ide/components/ide_side_bar.vue index 945a7b981f5..4f4c10918ca 100644 --- a/app/assets/javascripts/ide/components/ide_side_bar.vue +++ b/app/assets/javascripts/ide/components/ide_side_bar.vue @@ -72,11 +72,9 @@ export default { }); }, loading() { - if (!this.loading) { - this.$nextTick(() => { - this.addDropdownListeners(); - }); - } + this.$nextTick(() => { + this.addDropdownListeners(); + }); }, }, mounted() { @@ -89,11 +87,12 @@ export default { }, methods: { addDropdownListeners() { + if (!this.$refs.mergeRequestDropdown) return; + $(this.$refs.mergeRequestDropdown) .on('show.bs.dropdown', () => { this.toggleMergeRequestDropdown(); - }) - .on('hide.bs.dropdown', () => { + }).on('hide.bs.dropdown', () => { this.toggleMergeRequestDropdown(); }); }, diff --git a/app/assets/javascripts/ide/components/merge_requests/item.vue b/app/assets/javascripts/ide/components/merge_requests/item.vue index 907c274bf4d..b50fc8a3dbb 100644 --- a/app/assets/javascripts/ide/components/merge_requests/item.vue +++ b/app/assets/javascripts/ide/components/merge_requests/item.vue @@ -42,7 +42,7 @@ export default {