Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
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,
items: items.length > 0 ? items : undefined,
open: node.expanded,
selected: node.selected,
+ indeterminate: isIndeterminate,
status: TreeItemStatus.LOADED,
};
};
open: boolean;
active: boolean;
selected?: boolean;
+ indeterminate?: boolean;
flatTree?: boolean;
status: TreeItemStatus;
items?: Array<TreeItem<T>>;
{showSelection(it) && !useRadioButtons &&
<Checkbox
checked={it.selected}
+ indeterminate={!it.selected && it.indeterminate}
className={classes.checkbox}
color="primary"
onClick={this.handleCheckboxChange(it)} />}