X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/bf6ffb898a38a806ea0dd98daca7b3801923b62f..0537bee45712945bd97d28f6d28118f7589a6840:/src/components/data-table-filters/data-table-filters-tree.tsx?ds=sidebyside

diff --git a/src/components/data-table-filters/data-table-filters-tree.tsx b/src/components/data-table-filters/data-table-filters-tree.tsx
index 6514078d..659a385d 100644
--- a/src/components/data-table-filters/data-table-filters-tree.tsx
+++ b/src/components/data-table-filters/data-table-filters-tree.tsx
@@ -83,6 +83,7 @@ const filterToTreeItem = (filters: DataTableFilters) =>
         const node = getNode(id)(filters) || initTreeNode({ id: '', value: 'InvalidNode' });
         const items = getNodeChildrenIds(node.id)(filters)
             .map(filterToTreeItem(filters));
+        const isIndeterminate = !node.selected && items.some(i => i.selected || i.indeterminate);
 
         return {
             active: node.active,
@@ -91,6 +92,7 @@ const filterToTreeItem = (filters: DataTableFilters) =>
             items: items.length > 0 ? items : undefined,
             open: node.expanded,
             selected: node.selected,
+            indeterminate: isIndeterminate,
             status: TreeItemStatus.LOADED,
         };
     };
