diff --git a/frontend/src/components/project/views/ProjectList.vue b/frontend/src/components/project/views/ProjectList.vue index e2a61cf37..fa094f211 100644 --- a/frontend/src/components/project/views/ProjectList.vue +++ b/frontend/src/components/project/views/ProjectList.vue @@ -73,7 +73,7 @@ > @@ -220,6 +220,13 @@ function updateTaskList(task: ITask) { } function updateTasks(updatedTask: ITask) { + if (props.projectId < 0) { + // In the case of a filter, we'll reload the filter in the background to avoid tasks which do + // not match the filter show up here + loadTasks(false) + return + } + for (const t in tasks.value) { if (tasks.value[t].id === updatedTask.id) { tasks.value[t] = updatedTask @@ -308,7 +315,7 @@ function prepareFiltersAndLoadTasks() { .list-view { padding-bottom: 1rem; - + :deep(.card) { margin-bottom: 0; } diff --git a/frontend/src/composables/useTaskList.ts b/frontend/src/composables/useTaskList.ts index 09b065c1e..d34d47963 100644 --- a/frontend/src/composables/useTaskList.ts +++ b/frontend/src/composables/useTaskList.ts @@ -105,8 +105,10 @@ export function useTaskList( const totalPages = computed(() => taskCollectionService.totalPages) const tasks = ref([]) - async function loadTasks() { - tasks.value = [] + async function loadTasks(resetBeforeLoad: boolean = true) { + if(resetBeforeLoad) { + tasks.value = [] + } try { tasks.value = await taskCollectionService.getAll(...getAllTasksParams.value) } catch (e) {