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

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

parent 2ea3720e
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment