Skip to content
Snippets Groups Projects
Commit bbeae525 authored by esikkala's avatar esikkala
Browse files

Hierarchical facet: allow selecting parents with 0 hits

parent f2ceee88
No related branches found
No related tags found
No related merge requests found
......@@ -188,8 +188,11 @@ class HierarchicalFacet extends Component {
className={this.props.classes.checkbox}
checked={isSelected}
disabled={
// prevent selecting values with 0 hits (which may appear based on earlier selections):
(treeObj.node.instanceCount == 0 && treeObj.node.selected === 'false')
/* non-hierarchical facet:
prevent selecting values with 0 hits (which may appear based on earlier selections): */
(this.props.facet.type !== 'hierarchical'
&& treeObj.node.instanceCount == 0
&& treeObj.node.selected === 'false')
// prevent selecting unknown value:
|| treeObj.node.prefLabel == 'Unknown'
// prevent selecting when another facet is still updating:
......
......@@ -50,7 +50,8 @@ export const INITIAL_STATE = {
containerClass: 'ten',
filterType: 'uriFilter',
uriFilter: null,
spatialFilter: null
spatialFilter: null,
type: 'hierarchical',
},
// productionDate: {
// id: 'productionDate',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment