Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 39db2ea

Browse files
authored
Avoid filtering Attribute Filter options when query type is OR (#1339)
1 parent 685fe0a commit 39db2ea

File tree

1 file changed

+2
-1
lines changed
  • assets/js/blocks/attribute-filter

1 file changed

+2
-1
lines changed

assets/js/blocks/attribute-filter/block.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ const AttributeFilterBlock = ( {
102102
shouldSelect: blockAttributes.attributeId > 0,
103103
} );
104104

105+
const filterAvailableFilters = blockAttributes.queryType === 'and';
105106
const {
106107
results: filteredCounts,
107108
isLoading: filteredCountsLoading,
@@ -110,7 +111,7 @@ const AttributeFilterBlock = ( {
110111
taxonomy: attributeObject.taxonomy,
111112
queryType: blockAttributes.queryType,
112113
},
113-
queryState,
114+
queryState: filterAvailableFilters ? queryState : null,
114115
} );
115116

116117
/**

0 commit comments

Comments
 (0)