Automatically scroll to the bottom of a bucket after adding a new task to it

This commit is contained in:
kolaente 2020-07-04 19:08:01 +02:00
parent e66c8bf6b3
commit 6a4164513f
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -29,7 +29,7 @@
</div>
</div>
</div>
<div class="tasks">
<div class="tasks" :ref="`tasks-container${bucket.id}`">
<Container
@drop="e => onDrop(bucket.id, e)"
group-name="buckets"
@ -379,6 +379,12 @@
.catch(e => {
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() {
if (this.newBucketTitle === '') {