Fixes skeleton animation appearing on advanced search right after component is mounted.

This commit is contained in:
Mateus Machado Luna 2019-04-15 12:09:30 -03:00
parent fa3a4343f2
commit 86db0ebc65
3 changed files with 7 additions and 7 deletions

View File

@ -708,7 +708,7 @@
:collection-id="collectionId"
:displayed-metadata="displayedMetadata"
:items="items"
:is-filters-menu-compressed="isFiltersMenuCompressed"
:is-filters-menu-compressed="isFiltersMenuCompressed || openAdvancedSearch "
:total-items="totalItems"
:is-loading="isLoadingItems"
:is="registeredViewModes[viewMode] != undefined ? registeredViewModes[viewMode].component : ''"/>

View File

@ -123,7 +123,6 @@
:taxonomy="taxonomy"
:collapsed="collapseAll"
:is-repository-level="isRepositoryLevel"/>
<section
v-else
class="is-grouped-centered section">

View File

@ -88,8 +88,7 @@ export default {
},
data () {
return {
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png',
isMounted: false
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png'
}
},
methods: {
@ -121,7 +120,7 @@ export default {
this.$refs.masonryWrapper.children[0] != undefined &&
this.$refs.masonryWrapper.children[0].children[0] != 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;
},
@ -130,12 +129,14 @@ export default {
}, 500)
},
mounted() {
if (this.$refs.masonryWrapper != undefined &&
this.$refs.masonryWrapper.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;
else
this.recalculateItemsHeight();
} else
this.itemColumnWidth = 202;
},
created() {