Merge pull request #5827 from aignatov-bio/ai-sci-8843-fix-notification-infinite-scroll

Fix infinite scroll for notifications [SCI-8843]
This commit is contained in:
artoscinote 2023-08-16 10:27:07 +02:00 committed by GitHub
commit 083bd4b1e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,8 +66,10 @@ export default {
},
mounted() {
let container = this.$refs.scrollContainer.$el
container.addEventListener('ps-y-reach-end', (e) => {
this.loadNotifications();
container.addEventListener('ps-scroll-y', (e) => {
if (e.target.scrollTop + e.target.clientHeight >= e.target.scrollHeight - 20) {
this.loadNotifications();
}
})
},
computed: {