From 0f27aef41218f9a1f02ef4aab8c546e9bdfadcff Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Mon, 26 Jan 2015 16:42:24 +0000 Subject: [PATCH] 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. --- code/GridFieldOrderableRows.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/GridFieldOrderableRows.php b/code/GridFieldOrderableRows.php index 3440a53..a1e8ea1 100755 --- a/code/GridFieldOrderableRows.php +++ b/code/GridFieldOrderableRows.php @@ -224,7 +224,7 @@ class GridFieldOrderableRows extends RequestHandler implements } } $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. if(count($items) != count($ids)) {