fix(tasks): don't load tasks multiple times when viewing list or gantt view
This commit is contained in:
parent
3c1041902e
commit
78d4a518a3
@ -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
|
||||
|
@ -300,7 +300,7 @@ function prepareFiltersAndLoadTasks() {
|
||||
sortByParam.value = {}
|
||||
sortByParam.value[ALPHABETICAL_SORT] = 'asc'
|
||||
}
|
||||
|
||||
|
||||
loadTasks()
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user