Fixes masonry initialization error when switching view modes.
This commit is contained in:
parent
d17fcb7532
commit
e2b91b72e9
|
@ -118,8 +118,9 @@ export default {
|
|||
watch: {
|
||||
isLoading: {
|
||||
handler() {
|
||||
if (this.items && this.items.length > 0) {
|
||||
if (this.items && this.items.length > 0 && !this.isLoading) {
|
||||
this.$nextTick(() => {
|
||||
console.log(this.items.length)
|
||||
if (this.masonry !== false)
|
||||
this.masonry.destroy();
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ export default {
|
|||
watch: {
|
||||
isLoading: {
|
||||
handler() {
|
||||
if (this.items && this.items.length > 0) {
|
||||
if (this.items && this.items.length > 0 && !this.isLoading) {
|
||||
this.$nextTick(() => {
|
||||
if (this.masonry !== false)
|
||||
this.masonry.destroy();
|
||||
|
|
Loading…
Reference in New Issue