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'
|
import {getDefaultParams} from '@/composables/useTaskList'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
@ -48,6 +48,9 @@ const value = computed({
|
|||||||
return props.modelValue
|
return props.modelValue
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
|
if(props.modelValue === value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
emit('update:modelValue', value)
|
emit('update:modelValue', value)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -59,7 +62,7 @@ watch(
|
|||||||
},
|
},
|
||||||
{immediate: true},
|
{immediate: true},
|
||||||
)
|
)
|
||||||
|
|
||||||
const hasFilters = computed(() => {
|
const hasFilters = computed(() => {
|
||||||
// this.value also contains the page parameter which we don't want to include in filters
|
// this.value also contains the page parameter which we don't want to include in filters
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
@ -300,7 +300,7 @@ function prepareFiltersAndLoadTasks() {
|
|||||||
sortByParam.value = {}
|
sortByParam.value = {}
|
||||||
sortByParam.value[ALPHABETICAL_SORT] = 'asc'
|
sortByParam.value[ALPHABETICAL_SORT] = 'asc'
|
||||||
}
|
}
|
||||||
|
|
||||||
loadTasks()
|
loadTasks()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user