You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
There an issue when I click on button previous I go previous twice and not only one time.
I've check the code and the issue is here :
prev(): void {
this.$emit('prev')
const container = this.$refs.container as Element
const left = container.getBoundingClientRect().left
const x = left + (container.clientWidth * -this.displacement) - delta
const element = this.findPrevSlot(x)
if (element) {
const width = element.getBoundingClientRect().left - left
this.scrollToLeft(container.scrollLeft + width)
return
}
const width = container.clientWidth * this.displacement
this.scrollToLeft(container.scrollLeft - width)
},
You have to change
if (element) {
const width = element.getBoundingClientRect().left - left
this.scrollToLeft(container.scrollLeft + width)
return
}
by
if (element) {
const width = element.getBoundingClientRect().left - left
if (width > delta) {
this.scrollToLeft(container.scrollLeft + width)
return
}
}
Best regards
The text was updated successfully, but these errors were encountered:
Hi,
There an issue when I click on button previous I go previous twice and not only one time.
I've check the code and the issue is here :
prev(): void {
this.$emit('prev')
You have to change
if (element) {
const width = element.getBoundingClientRect().left - left
this.scrollToLeft(container.scrollLeft + width)
return
}
by
if (element) {
const width = element.getBoundingClientRect().left - left
if (width > delta) {
this.scrollToLeft(container.scrollLeft + width)
return
}
}
Best regards
The text was updated successfully, but these errors were encountered: