Commit b4865ee3 authored by Roger Codina's avatar Roger Codina Committed by Neslee Canil Pinto
Browse files

Issue #3255217 by rcodina: "Sort filter options" not working when filter not required

parent 2ea3720e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ abstract class FilterWidgetBase extends BetterExposedFiltersWidgetBase implement

    // Ensure "- Any -" value does not get sorted.
    $any_option = FALSE;
    if (empty($element['#required'])) {
    if (empty($element['#required']) && $element['#required'] !== FALSE) {
      // We use array_slice to preserve they keys needed to determine the value
      // when using a filter (e.g. taxonomy terms).
      $any_option = array_slice($options, 0, 1, TRUE);