Skip to content

Commit

Permalink
Fixed #1594 - Thumbnails are not displayed correctly on Galleria if n…
Browse files Browse the repository at this point in the history
…umVisible is greater than the length of value for v2
  • Loading branch information
tugcekucukoglu committed Sep 22, 2021
1 parent 713be46 commit 7766023
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/galleria/Galleria.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export default {
.p-galleria-thumbnail-items-container {
overflow: hidden;
width: 100%;
}
.p-galleria-thumbnail-items {
Expand Down
9 changes: 9 additions & 0 deletions src/components/galleria/GalleriaContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,21 @@ export default {
return {
id: this.$attrs.id || UniqueComponentId(),
activeIndex: this.$attrs.activeIndex,
numVisible: this.$attrs.numVisible,
slideShowActive: false
}
},
watch: {
'$attrs.value': function(newVal) {
if (newVal && newVal.length < this.numVisible) {
this.numVisible = newVal.length;
}
},
'$attrs.activeIndex': function(newVal) {
this.activeIndex = newVal;
},
'$attrs.numVisible': function(newVal) {
this.numVisible = newVal;
}
},
updated() {
Expand Down

0 comments on commit 7766023

Please sign in to comment.