comand-component-library 3.3.38 → 3.3.39
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -44,11 +44,11 @@ export default {
|
|
44
44
|
},
|
45
45
|
created() {
|
46
46
|
window.addEventListener('resize', this.onViewportChange)
|
47
|
-
|
47
|
+
document.querySelector(this.parentSelector)?.addEventListener('scroll', this.onViewportChange)
|
48
48
|
},
|
49
49
|
unmounted() {
|
50
50
|
window.removeEventListener('resize', this.onViewportChange)
|
51
|
-
|
51
|
+
document.querySelector(this.parentSelector)?.removeEventListener('scroll', this.onViewportChange)
|
52
52
|
},
|
53
53
|
/* watch for changes */
|
54
54
|
computed: {
|
@@ -63,7 +63,7 @@ export default {
|
|
63
63
|
this.scrollHeight = document.querySelector(this.parentSelector)?.scrollHeight || 0
|
64
64
|
},
|
65
65
|
onBackToTop() {
|
66
|
-
|
66
|
+
document.querySelector(this.parentSelector)?.scrollTo({top: 0, left: 0, behavior: 'smooth'})
|
67
67
|
}
|
68
68
|
}
|
69
69
|
}
|