Automatically scroll to the bottom of a bucket after adding a new task to it
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-07-04 19:08:01 +02:00
parent e66c8bf6b3
commit 6a4164513f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 7 additions and 1 deletions

View File

@ -29,7 +29,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="tasks"> <div class="tasks" :ref="`tasks-container${bucket.id}`">
<Container <Container
@drop="e => onDrop(bucket.id, e)" @drop="e => onDrop(bucket.id, e)"
group-name="buckets" group-name="buckets"
@ -379,6 +379,12 @@
.catch(e => { .catch(e => {
this.error(e, this) this.error(e, this)
}) })
.finally(() => {
if(!this.$refs[`tasks-container${task.bucketId}`][0]) {
return
}
this.$refs[`tasks-container${task.bucketId}`][0].scrollTop = this.$refs[`tasks-container${task.bucketId}`][0].scrollHeight
})
}, },
createNewBucket() { createNewBucket() {
if (this.newBucketTitle === '') { if (this.newBucketTitle === '') {