BigW Consortium Gitlab

Commit ac7949db by Phil Hughes Committed by Fatih Acet

Fixed masonry re-triggering when it didnt need to

Fixed scroll position being lost
parent c4fc17f2
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment