diff options
-rw-r--r-- | app/assets/javascripts/boards/components/modal/list.js.es6 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/components/modal/list.js.es6 b/app/assets/javascripts/boards/components/modal/list.js.es6 index 6a681d9278f..4ef40f851d4 100644 --- a/app/assets/javascripts/boards/components/modal/list.js.es6 +++ b/app/assets/javascripts/boards/components/modal/list.js.es6 @@ -14,8 +14,10 @@ this.initMasonry(); }, issues: { - handler() { - this.initMasonry(); + handler(issues, oldIssues) { + if (this.activeTab === 'selected' || issues.length !== oldIssues.length) { + this.initMasonry(); + } }, deep: true, }, @@ -37,11 +39,15 @@ return issue.selected; }, initMasonry() { + const listScrollTop = this.$refs.list.scrollTop; + this.$nextTick(() => { this.destroyMasonry(); listMasonry = new Masonry(this.$refs.list, { transitionDuration: 0, }); + + this.$refs.list.scrollTop = listScrollTop; }); }, destroyMasonry() { |