mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 17:05:38 +02:00
Accounts for GridFieldSortableHeader changing the sort
This commit is contained in:
parent
48996eb6ee
commit
32746c875c
@ -60,6 +60,11 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
||||
* @return {DataList} Modified Data List
|
||||
*/
|
||||
public function getManipulatedData(GridField $gridField, SS_List $dataList) {
|
||||
$state=$gridField->State->GridFieldSortableHeader;
|
||||
if ($state && !empty($state->SortColumn)) {
|
||||
return $dataList;
|
||||
}
|
||||
|
||||
return $dataList->sort($this->sortColumn);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user