Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: filters no longer return only cached field

MonsPropre4bd8d925206b
diff --git a/apps/web/src/hooks/use-task-filters-with-labels-support.ts b/apps/web/src/hooks/use-task-filters-with-labels-support.ts
index 92dc594c4..e21152f2b 100644
--- a/apps/web/src/hooks/use-task-filters-with-labels-support.ts
+++ b/apps/web/src/hooks/use-task-filters-with-labels-support.ts
@@ -206,15 +206,21 @@ export function useTaskFiltersWithLabelsSupport(
Object.keys(filters.customFields).length > 0
) {
const taskFieldValues = getValuesForTask(task.id);
+
const matchesAllFields = Object.entries(filters.customFields).every(
([fieldId, allowedValues]) => {
const fieldEntry = taskFieldValues.find(
(v) => v.fieldId === fieldId,
);
- if (!fieldEntry?.value) return false;
+
+ if (!fieldEntry || fieldEntry.value == null) {
+ return true;
+ }
+
return allowedValues.includes(fieldEntry.value);
},
);
+
if (!matchesAllFields) return false;
}