Fixes skeleton animation appearing on advanced search right after component is mounted.
This commit is contained in:
parent
fa3a4343f2
commit
86db0ebc65
|
@ -708,7 +708,7 @@
|
||||||
:collection-id="collectionId"
|
:collection-id="collectionId"
|
||||||
:displayed-metadata="displayedMetadata"
|
:displayed-metadata="displayedMetadata"
|
||||||
:items="items"
|
:items="items"
|
||||||
:is-filters-menu-compressed="isFiltersMenuCompressed"
|
:is-filters-menu-compressed="isFiltersMenuCompressed || openAdvancedSearch "
|
||||||
:total-items="totalItems"
|
:total-items="totalItems"
|
||||||
:is-loading="isLoadingItems"
|
:is-loading="isLoadingItems"
|
||||||
:is="registeredViewModes[viewMode] != undefined ? registeredViewModes[viewMode].component : ''"/>
|
:is="registeredViewModes[viewMode] != undefined ? registeredViewModes[viewMode].component : ''"/>
|
||||||
|
|
|
@ -123,7 +123,6 @@
|
||||||
:taxonomy="taxonomy"
|
:taxonomy="taxonomy"
|
||||||
:collapsed="collapseAll"
|
:collapsed="collapseAll"
|
||||||
:is-repository-level="isRepositoryLevel"/>
|
:is-repository-level="isRepositoryLevel"/>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
v-else
|
v-else
|
||||||
class="is-grouped-centered section">
|
class="is-grouped-centered section">
|
||||||
|
|
|
@ -88,8 +88,7 @@ export default {
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png',
|
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png'
|
||||||
isMounted: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -121,7 +120,7 @@ export default {
|
||||||
this.$refs.masonryWrapper.children[0] != undefined &&
|
this.$refs.masonryWrapper.children[0] != undefined &&
|
||||||
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
|
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
|
||||||
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined)
|
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined)
|
||||||
this.itemColumnWidth = this.$refs.masonryWrapper.children[0].children[0].clientWidth;
|
this.itemColumnWidth = this.$refs.masonryWrapper.children[0].children[0].clientWidth;
|
||||||
|
|
||||||
return (imageHeight*this.itemColumnWidth)/imageWidth;
|
return (imageHeight*this.itemColumnWidth)/imageWidth;
|
||||||
},
|
},
|
||||||
|
@ -130,12 +129,14 @@ export default {
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
if (this.$refs.masonryWrapper != undefined &&
|
if (this.$refs.masonryWrapper != undefined &&
|
||||||
this.$refs.masonryWrapper.children[0] != undefined &&
|
this.$refs.masonryWrapper.children[0] != undefined &&
|
||||||
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
|
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
|
||||||
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined)
|
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined) {
|
||||||
this.itemColumnWidth = this.$refs.masonryWrapper.children[0].children[0].clientWidth;
|
this.itemColumnWidth = this.$refs.masonryWrapper.children[0].children[0].clientWidth;
|
||||||
else
|
this.recalculateItemsHeight();
|
||||||
|
} else
|
||||||
this.itemColumnWidth = 202;
|
this.itemColumnWidth = 202;
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
Loading…
Reference in New Issue