diff --git a/modules/facets_exposed_filters/src/Plugin/views/filter/FacetsFilter.php b/modules/facets_exposed_filters/src/Plugin/views/filter/FacetsFilter.php index fc481aad91107155a31456aee473a796cef605b4..760a916c083e54a8a7ae85f570b174e503c8ac7b 100644 --- a/modules/facets_exposed_filters/src/Plugin/views/filter/FacetsFilter.php +++ b/modules/facets_exposed_filters/src/Plugin/views/filter/FacetsFilter.php @@ -164,6 +164,7 @@ class FacetsFilter extends FilterPluginBase { if (!empty($active_sort_processors)) { $facet->setResults($this->sortFacetResults($active_sort_processors, $facet->getResults())); } + $facet->setActiveItems(array_values($active_facet_values)); // Store the processed facet so we can access it later (e.g. in an exposed form rendered as a block). facets_exposed_filters_get_processed_facet($this->view->id(), $this->view->current_display, $this->options["id"], $facet); @@ -172,7 +173,7 @@ class FacetsFilter extends FilterPluginBase { // We need to merge the existing #process callbacks with our own. $select_element = \Drupal::service('element_info')->getInfo('select'); - $this->value = array_values($active_facet_values); + $this->value = $facet->getActiveItems(); // Store processed results so other modules can use these. $this->facet_results = $facet->getResults(); $form['value'] = [