Skip to content
Snippets Groups Projects
Commit f5071ee2 authored by HeikkiR's avatar HeikkiR
Browse files

Disable hierarchical facet while fetching resultcount

parent be3bd2e6
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,7 @@ class FacetBar extends React.Component {
updatedFilter={updatedFilter}
fetchFacet={this.props.fetchFacet}
someFacetIsFetching={someFacetIsFetching}
fetchingResultCount={this.props.fetchingResultCount}
updateFacetOption={this.props.updateFacetOption}
/>
)
......@@ -117,6 +118,7 @@ class FacetBar extends React.Component {
facetUpdateID={facetUpdateID}
clientFSUpdateFacet={this.props.clientFSUpdateFacet}
someFacetIsFetching={someFacetIsFetching}
fetchingResultCount={false}
facetedSearchMode='clientFS'
/>
)
......
......@@ -234,6 +234,8 @@ class HierarchicalFacet extends Component {
// node.id === 'http://ldf.fi/MISSING_VALUE' ||
// prevent selecting when another facet is still updating:
this.props.someFacetIsFetching ||
// prevent selecting while resultcount is updating
this.props.fetchingResultCount ||
// prevent selecting all facet values when there is a logical OR between the selections:
// (!this.props.facet.useConjuction && !isSelected && selectedCount >= this.props.facet.distinctValueCount - 1) ||
// prevent selecting when parent has been selected
......@@ -400,6 +402,10 @@ HierarchicalFacet.propTypes = {
* A facet should be disabled while some other facet is updating.
*/
someFacetIsFetching: PropTypes.bool.isRequired,
/**
* A facet should be disabled while resultcount is updating.
*/
fetchingResultCount: PropTypes.bool.isRequired,
/**
* An integer for detecting if some other facet was updated.
*/
......
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