SortBox: Fix "algorithm" to detect the opposite sort direction
This commit is contained in:
parent
3d60e60842
commit
4f5afb5ee2
|
@ -203,7 +203,7 @@ class SortBox extends AbstractWidget
|
|||
|
||||
// TODO(el): ToggleButton :)
|
||||
$toggle = array('asc' => 'sort-name-down', 'desc' => 'sort-name-up');
|
||||
unset($toggle[$direction]);
|
||||
unset($toggle[strtolower($direction) ?: 'asc']);
|
||||
$newDirection = key($toggle);
|
||||
$icon = current($toggle);
|
||||
|
||||
|
|
Loading…
Reference in New Issue