mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
FIX Filter by ID to be more compatible with ArrayList
`ArrayList` doesn't have a `byIDs` method so sorting items in an `ArrayList` breaks. This is a more forgiving way of filtering by ID.
This commit is contained in:
parent
bb0a84d16a
commit
0f27aef412
@ -224,7 +224,7 @@ class GridFieldOrderableRows extends RequestHandler implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sortterm .= $field;
|
$sortterm .= $field;
|
||||||
$items = $list->byIDs($ids)->sort($sortterm);
|
$items = $list->filter('ID', $ids)->sort($sortterm);
|
||||||
|
|
||||||
// Ensure that each provided ID corresponded to an actual object.
|
// Ensure that each provided ID corresponded to an actual object.
|
||||||
if(count($items) != count($ids)) {
|
if(count($items) != count($ids)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user