fix(tasks): don't load tasks multiple times when viewing list or gantt view
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2024-01-26 21:33:20 +01:00
parent 3c1041902e
commit 78d4a518a3
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 6 additions and 3 deletions

View File

@ -36,7 +36,7 @@ import Filters from '@/components/project/partials/filters.vue'
import {getDefaultParams} from '@/composables/useTaskList'
const props = defineProps({
const props = defineProps({
modelValue: {
required: true,
},
@ -48,6 +48,9 @@ const value = computed({
return props.modelValue
},
set(value) {
if(props.modelValue === value) {
return
}
emit('update:modelValue', value)
},
})
@ -59,7 +62,7 @@ watch(
},
{immediate: true},
)
const hasFilters = computed(() => {
// this.value also contains the page parameter which we don't want to include in filters
// eslint-disable-next-line no-unused-vars

View File

@ -300,7 +300,7 @@ function prepareFiltersAndLoadTasks() {
sortByParam.value = {}
sortByParam.value[ALPHABETICAL_SORT] = 'asc'
}
loadTasks()
}
</script>