From 2e3dcb348a4b6a2c6a65bdb7cc941548f460f7d1 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tumanov Date: Thu, 30 Mar 2023 10:10:07 +0500 Subject: [PATCH] TSK-987: show filter with 0 value (#2855) Signed-off-by: Vyacheslav Tumanov --- .../view-resources/src/components/filter/ObjectFilter.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/view-resources/src/components/filter/ObjectFilter.svelte b/plugins/view-resources/src/components/filter/ObjectFilter.svelte index d8edb9f171..61765fcb30 100644 --- a/plugins/view-resources/src/components/filter/ObjectFilter.svelte +++ b/plugins/view-resources/src/components/filter/ObjectFilter.svelte @@ -76,6 +76,9 @@ const value = getObjectValue(filter.key.key, object) ?? undefined targets.set(value, (targets.get(value) ?? 0) + 1) } + for (const object of filter.value) { + if (!targets.has(object)) targets.set(object, 0) + } const resultQuery = search !== '' && clazz.sortingKey