fix(list): automatically close task edit pane when switching between lists
continuous-integration/drone/push Build is failing Details

Resolves #2442
This commit is contained in:
kolaente 2022-09-30 21:13:13 +02:00
parent 266f877455
commit 72b731d620
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 12 additions and 2 deletions

View File

@ -118,7 +118,7 @@
v-if="isTaskEdit"
class="taskedit mt-0"
:title="$t('list.list.editTask')"
@close="() => isTaskEdit = false"
@close="closeTaskEditPane()"
:shadow="false"
:task="taskEditTask"
/>
@ -139,7 +139,7 @@ export default { name: 'List' }
</script>
<script setup lang="ts">
import {ref, computed, toRef, nextTick, onMounted, type PropType} from 'vue'
import {ref, computed, toRef, nextTick, onMounted, type PropType, watch} from 'vue'
import draggable from 'zhyswan-vuedraggable'
import {useRoute, useRouter} from 'vue-router'
@ -203,6 +203,16 @@ const DRAG_OPTIONS = {
const taskEditTask = ref<ITask | null>(null)
const isTaskEdit = ref(false)
function closeTaskEditPane() {
isTaskEdit.value = false
taskEditTask.value = null
}
watch(
() => props.listId,
closeTaskEditPane,
)
const {
tasks,
loading,