Skip to content

Commit f5071ee

Browse files
committed
Disable hierarchical facet while fetching resultcount
1 parent be3bd2e commit f5071ee

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/client/components/facet_bar/FacetBar.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class FacetBar extends React.Component {
102102
updatedFilter={updatedFilter}
103103
fetchFacet={this.props.fetchFacet}
104104
someFacetIsFetching={someFacetIsFetching}
105+
fetchingResultCount={this.props.fetchingResultCount}
105106
updateFacetOption={this.props.updateFacetOption}
106107
/>
107108
)
@@ -117,6 +118,7 @@ class FacetBar extends React.Component {
117118
facetUpdateID={facetUpdateID}
118119
clientFSUpdateFacet={this.props.clientFSUpdateFacet}
119120
someFacetIsFetching={someFacetIsFetching}
121+
fetchingResultCount={false}
120122
facetedSearchMode='clientFS'
121123
/>
122124
)

src/client/components/facet_bar/HierarchicalFacet.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ class HierarchicalFacet extends Component {
234234
// node.id === 'http://ldf.fi/MISSING_VALUE' ||
235235
// prevent selecting when another facet is still updating:
236236
this.props.someFacetIsFetching ||
237+
// prevent selecting while resultcount is updating
238+
this.props.fetchingResultCount ||
237239
// prevent selecting all facet values when there is a logical OR between the selections:
238240
// (!this.props.facet.useConjuction && !isSelected && selectedCount >= this.props.facet.distinctValueCount - 1) ||
239241
// prevent selecting when parent has been selected
@@ -400,6 +402,10 @@ HierarchicalFacet.propTypes = {
400402
* A facet should be disabled while some other facet is updating.
401403
*/
402404
someFacetIsFetching: PropTypes.bool.isRequired,
405+
/**
406+
* A facet should be disabled while resultcount is updating.
407+
*/
408+
fetchingResultCount: PropTypes.bool.isRequired,
403409
/**
404410
* An integer for detecting if some other facet was updated.
405411
*/

0 commit comments

Comments
 (0)