mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Fixed GridFieldOrderableRows issue when data class is Versioned and relation is has_many (#243)
* Fixed GridFieldOrderableRows issue when data class is Versioned and relation is has_many * just compare table names rather than updating existing getSortTable() func
This commit is contained in:
parent
509abf1532
commit
6d8b41ee5a
@ -19,8 +19,8 @@ use SilverStripe\ORM\DataObject;
|
|||||||
use SilverStripe\ORM\DataObjectInterface;
|
use SilverStripe\ORM\DataObjectInterface;
|
||||||
use SilverStripe\ORM\DB;
|
use SilverStripe\ORM\DB;
|
||||||
use SilverStripe\ORM\ManyManyList;
|
use SilverStripe\ORM\ManyManyList;
|
||||||
|
use SilverStripe\ORM\Map;
|
||||||
use SilverStripe\ORM\SS_List;
|
use SilverStripe\ORM\SS_List;
|
||||||
use SilverStripe\ORM\SS_Map;
|
|
||||||
use SilverStripe\Versioned\Versioned;
|
use SilverStripe\Versioned\Versioned;
|
||||||
use SilverStripe\View\ViewableData;
|
use SilverStripe\View\ViewableData;
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ class GridFieldOrderableRows extends RequestHandler implements
|
|||||||
/** @var SS_List $map */
|
/** @var SS_List $map */
|
||||||
$map = $list->map('ID', $sortField);
|
$map = $list->map('ID', $sortField);
|
||||||
//fix for versions of SS that return inconsistent types for `map` function
|
//fix for versions of SS that return inconsistent types for `map` function
|
||||||
if ($map instanceof SS_Map) {
|
if ($map instanceof Map) {
|
||||||
$map = $map->toArray();
|
$map = $map->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user