mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-25 06:35:32 +00:00
fix(kanban): make sure only one task input field can be visible at the same time
This commit is contained in:
@@ -165,7 +165,7 @@
|
|||||||
class="bucket-footer"
|
class="bucket-footer"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="showNewTaskInput[bucket.id]"
|
v-if="showNewTaskInput === bucket.id"
|
||||||
class="field"
|
class="field"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -371,7 +371,7 @@ const bucketToDelete = ref(0)
|
|||||||
const bucketTitleEditable = ref(false)
|
const bucketTitleEditable = ref(false)
|
||||||
|
|
||||||
const newTaskText = ref('')
|
const newTaskText = ref('')
|
||||||
const showNewTaskInput = ref<{ [id: IBucket['id']]: boolean }>({})
|
const showNewTaskInput = ref<IBucket['id'] | null>(null)
|
||||||
|
|
||||||
const newBucketTitle = ref('')
|
const newBucketTitle = ref('')
|
||||||
const showNewBucketInput = ref(false)
|
const showNewBucketInput = ref(false)
|
||||||
@@ -612,7 +612,9 @@ function toggleShowNewTaskInput(bucketId: IBucket['id']) {
|
|||||||
if (loading.value || taskLoading.value) {
|
if (loading.value || taskLoading.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
showNewTaskInput.value[bucketId] = !showNewTaskInput.value[bucketId]
|
showNewTaskInput.value = showNewTaskInput.value === bucketId
|
||||||
|
? null
|
||||||
|
: bucketId
|
||||||
newTaskInputFocused.value = false
|
newTaskInputFocused.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user