vue3-scroll-shadow-fixes (#260)

This commit is contained in:
formsdev 2023-12-12 19:10:08 +05:30 committed by GitHub
parent f970557b76
commit 71121361f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -59,9 +59,9 @@ export default {
window.addEventListener('resize', this.calcDimensions) window.addEventListener('resize', this.calcDimensions)
// Check if shadows are necessary after the element is resized. // Check if shadows are necessary after the element is resized.
const scrollContainerObserver = newResizeObserver(this.toggleShadow) this.scrollContainerObserver = newResizeObserver(this.toggleShadow)
if (scrollContainerObserver) { if (this.scrollContainerObserver) {
scrollContainerObserver.observe(this.$refs.scrollContainer) this.scrollContainerObserver.observe(this.$refs.scrollContainer)
} }
// Recalculate the container dimensions when the wrapper is resized. // Recalculate the container dimensions when the wrapper is resized.