diff --git a/src/Presentation/ListFacetHtmlBuilder.php b/src/Presentation/ListFacetHtmlBuilder.php index 02c9db5..2bdd431 100644 --- a/src/Presentation/ListFacetHtmlBuilder.php +++ b/src/Presentation/ListFacetHtmlBuilder.php @@ -32,7 +32,15 @@ public function __construct( public function buildHtml( FacetConfig $config, PropertyConstraints $state ): string { $valueCounts = $this->getValuesAndCounts( $config ); - if ( count( $valueCounts ) === 0 ) { + + if ( $valueCounts === [] && $state->getAndSelectedValues() !== [] ) { + $valueCounts = array_map( + fn( $value ) => new ValueCount( $value, 0 ), + $state->getAndSelectedValues() + ); + } + + if ( $valueCounts === [] ) { return ''; }