diff --git a/assets/js/blocks/attribute-filter/block.tsx b/assets/js/blocks/attribute-filter/block.tsx index 8373473f7ad..2dcbd2db0d5 100644 --- a/assets/js/blocks/attribute-filter/block.tsx +++ b/assets/js/blocks/attribute-filter/block.tsx @@ -527,6 +527,10 @@ const AttributeFilterBlock = ( { return null; } + const showChevron = multiple + ? ! isLoading && checked.length < displayedOptions.length + : ! isLoading && checked.length === 0; + const heading = ( { blockAttributes.heading } @@ -666,7 +670,7 @@ const AttributeFilterBlock = ( { ), } } /> - { multiple && ( + { showChevron && ( ) } diff --git a/assets/js/blocks/rating-filter/block.tsx b/assets/js/blocks/rating-filter/block.tsx index 48cd815cba5..416b1e9306d 100644 --- a/assets/js/blocks/rating-filter/block.tsx +++ b/assets/js/blocks/rating-filter/block.tsx @@ -166,6 +166,10 @@ const RatingFilterBlock = ( { const multiple = blockAttributes.selectType !== 'single'; + const showChevron = multiple + ? ! isLoading && checked.length < displayedOptions.length + : ! isLoading && checked.length === 0; + const onSubmit = useCallback( ( checkedOptions ) => { if ( isEditor ) { @@ -466,7 +470,7 @@ const RatingFilterBlock = ( { ), } } /> - { multiple && ( + { showChevron && ( ) } diff --git a/assets/js/blocks/stock-filter/block.tsx b/assets/js/blocks/stock-filter/block.tsx index 6717586e8fb..4297f974768 100644 --- a/assets/js/blocks/stock-filter/block.tsx +++ b/assets/js/blocks/stock-filter/block.tsx @@ -426,6 +426,10 @@ const StockStatusFilterBlock = ( { return null; } + const showChevron = allowsMultipleOptions + ? ! isLoading && checked.length < displayedOptions.length + : ! isLoading && checked.length === 0; + const heading = ( { blockAttributes.heading } @@ -500,7 +504,7 @@ const StockStatusFilterBlock = ( { ), } } /> - { allowsMultipleOptions && ( + { showChevron && ( ) }