Always filter attribute filters based on price filter (https://github.com/woocommerce/woocommerce-blocks/pull/1390)

This commit is contained in:
Albert Juhé Lluveras 2019-12-16 14:04:19 +01:00 committed by GitHub
parent 80d76944cc
commit a4be92ec15
1 changed files with 5 additions and 2 deletions

View File

@ -66,7 +66,7 @@ const AttributeFilterBlock = ( {
shouldSelect: blockAttributes.attributeId > 0, shouldSelect: blockAttributes.attributeId > 0,
} ); } );
const filterAvailableFilters = const filterAvailableTerms =
blockAttributes.displayStyle !== 'dropdown' && blockAttributes.displayStyle !== 'dropdown' &&
blockAttributes.queryType === 'and'; blockAttributes.queryType === 'and';
const { const {
@ -77,7 +77,10 @@ const AttributeFilterBlock = ( {
taxonomy: attributeObject.taxonomy, taxonomy: attributeObject.taxonomy,
queryType: blockAttributes.queryType, queryType: blockAttributes.queryType,
}, },
queryState: filterAvailableFilters ? queryState : null, queryState: {
...queryState,
attributes: filterAvailableTerms ? queryState.attributes : null,
},
} ); } );
/** /**