Don't allow dropping a bucket in another bucket
This commit is contained in:
parent
518404691c
commit
1c61792d21
@ -19,13 +19,13 @@
|
||||
<div :class="{ 'is-loading': loading && !oneTaskUpdating}" class="kanban kanban-bucket-container loader-container">
|
||||
<draggable
|
||||
v-model="buckets"
|
||||
@start="() => drag = true"
|
||||
@start="() => dragBucket = true"
|
||||
@end="updateBucketPosition"
|
||||
group="buckets"
|
||||
v-bind="dragOptions"
|
||||
:disabled="!canWrite"
|
||||
>
|
||||
<transition-group type="transition" :name="!drag ? 'move-bucket': null" tag="div" class="kanban-bucket-container">
|
||||
<transition-group type="transition" :name="!dragBucket ? 'move-bucket': null" tag="div" class="kanban-bucket-container">
|
||||
<div
|
||||
:key="`bucket${bucket.id}`"
|
||||
class="bucket"
|
||||
@ -124,7 +124,7 @@
|
||||
v-model="bucket.tasks"
|
||||
@start="() => drag = true"
|
||||
@end="updateTaskPosition"
|
||||
:group="{name: 'tasks', put: shouldAcceptDrop(bucket)}"
|
||||
:group="{name: 'tasks', put: shouldAcceptDrop(bucket) && !dragBucket}"
|
||||
v-bind="dragOptions"
|
||||
:disabled="!canWrite"
|
||||
:data-bucket-index="k"
|
||||
@ -249,6 +249,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
drag: false,
|
||||
dragBucket: false,
|
||||
dragOptions: {
|
||||
animation: 150,
|
||||
ghostClass: 'ghost',
|
||||
@ -491,6 +492,7 @@ export default {
|
||||
})
|
||||
},
|
||||
updateBucketPosition(e) {
|
||||
this.dragBucket = false
|
||||
console.log('drop bucket', e)
|
||||
},
|
||||
setBucketLimit(bucket) {
|
||||
|
Reference in New Issue
Block a user