fix: use correct listId to load next tasks

This commit is contained in:
Dominik Pschenitschni 2021-10-11 16:59:21 +02:00
parent 7c3ece5816
commit 0b68a473ef
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
1 changed files with 7 additions and 3 deletions

View File

@ -126,7 +126,7 @@
</div>
<div
:ref="(el) => setTaskContainerRef(bucket.id, el)"
@scroll="(el) => handleTaskContainerScroll(bucket.id, el)"
@scroll="($event) => handleTaskContainerScroll(bucket.id, bucket.listId, $event.target)"
class="tasks"
>
<draggable
@ -318,6 +318,7 @@ export default {
return this.list.isSavedFilter && !this.list.isSavedFilter()
},
loadBucketParameter() {
console.log('loadBucketParameter changed')
return {
listId: this.$route.params.listId,
params: this.params,
@ -382,7 +383,10 @@ export default {
this.taskContainerRefs[id] = el
},
handleTaskContainerScroll(id, el) {
handleTaskContainerScroll(id, listId, el) {
if (!el) {
return
}
const scrollTopMax = el.scrollHeight - el.clientHeight
const threshold = el.scrollTop + el.scrollTop * MIN_SCROLL_HEIGHT_PERCENT
if (scrollTopMax > threshold) {
@ -390,7 +394,7 @@ export default {
}
this.$store.dispatch('kanban/loadNextTasksForBucket', {
listId: this.$route.params.listId,
listId: listId,
params: this.params,
bucketId: id,
})