summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards/components/board_content.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/boards/components/board_content.vue')
-rw-r--r--app/assets/javascripts/boards/components/board_content.vue10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue
index 7baa821402a..6ed617acf30 100644
--- a/app/assets/javascripts/boards/components/board_content.vue
+++ b/app/assets/javascripts/boards/components/board_content.vue
@@ -6,6 +6,7 @@ import Draggable from 'vuedraggable';
import { mapState, mapGetters, mapActions } from 'vuex';
import { contentTop } from '~/lib/utils/common_utils';
import { s__ } from '~/locale';
+import eventHub from '~/boards/eventhub';
import { formatBoardLists } from 'ee_else_ce/boards/boards_util';
import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column.vue';
import { defaultSortableOptions } from '~/sortable/constants';
@@ -130,6 +131,12 @@ export default {
return this.isApolloBoard ? this.apolloError : this.error;
},
},
+ created() {
+ eventHub.$on('updateBoard', this.refetchLists);
+ },
+ beforeDestroy() {
+ eventHub.$off('updateBoard', this.refetchLists);
+ },
mounted() {
this.setBoardHeight();
@@ -156,6 +163,9 @@ export default {
this.boardHeight = `${window.innerHeight - this.$el.getBoundingClientRect().top}px`;
}
},
+ refetchLists() {
+ this.$apollo.queries.boardListsApollo.refetch();
+ },
},
};
</script>