From 7d0feab3abd1fa6459b9be81b340a9f9121d84b7 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 24 Jan 2017 15:51:15 +0000 Subject: Fixes layout issue on selected tab Fixed modal not closing on cancel clicked --- app/assets/javascripts/boards/components/modal/footer.js.es6 | 9 +++++---- app/assets/javascripts/boards/components/modal/list.js.es6 | 10 ++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/boards/components/modal/footer.js.es6 b/app/assets/javascripts/boards/components/modal/footer.js.es6 index dec0196a32c..aadb754fd9e 100644 --- a/app/assets/javascripts/boards/components/modal/footer.js.es6 +++ b/app/assets/javascripts/boards/components/modal/footer.js.es6 @@ -7,9 +7,10 @@ gl.issueBoards.ModalFooter = Vue.extend({ data() { - return Object.assign({}, Store.modal, { + return { + store: Store.modal, disabled: false, - }); + }; }, computed: { submitDisabled() { @@ -25,10 +26,10 @@ }, methods: { hideModal() { - this.showAddIssuesModal = false; + this.store.showAddIssuesModal = false; }, addIssues() { - const issueIds = this.issues.filter(issue => issue.selected).map(issue => issue.id); + const issueIds = this.store.issues.filter(issue => issue.selected).map(issue => issue.id); this.disabled = true; }, diff --git a/app/assets/javascripts/boards/components/modal/list.js.es6 b/app/assets/javascripts/boards/components/modal/list.js.es6 index e700161f642..067a6322bca 100644 --- a/app/assets/javascripts/boards/components/modal/list.js.es6 +++ b/app/assets/javascripts/boards/components/modal/list.js.es6 @@ -19,6 +19,16 @@ this.initMasonry(); }); }, + issues: { + handler() { + if (this.activeTab === 'selected') { + this.$nextTick(() => { + listMasonry.layout(); + }); + } + }, + deep: true, + } }, computed: { loading() { -- cgit v1.2.1