Account for NestedTree Trait setting (#3143)

* Account for NestedTree Trait setting

See https://github.com/rainlab/blog-plugin/issues/338. The Lists Widget did not account for the NestedTree setting.

* Update Lists.php
This commit is contained in:
datune 2017-10-04 22:04:12 +02:00 committed by Luke Towers
parent 263200fd7b
commit 4a0a488ff6
1 changed files with 1 additions and 1 deletions

View File

@ -486,7 +486,7 @@ class Lists extends WidgetBase
/*
* Apply sorting
*/
if ($sortColumn = $this->getSortColumn()) {
if (($sortColumn = $this->getSortColumn()) && !$this->showTree) {
if (($column = array_get($this->allColumns, $sortColumn)) && $column->valueFrom) {
$sortColumn = $this->isColumnPivot($column)
? 'pivot_' . $column->valueFrom