Skip to content

Commit

Permalink
FIX #355 Sorting in pageinated lists
Browse files Browse the repository at this point in the history
If a many_many relation with the sort in an many_many_extraField has an item draged to another page the resulting sort
is wrong. This was caused by the handleMoveToPage function not respecting the original sort of the list.
  • Loading branch information
johannes.hammersen authored and johannes.hammersen committed Sep 25, 2024
1 parent 54b5fc1 commit fbf7b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GridFieldOrderableRows.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public function handleMoveToPage(GridField $grid, $request)
$move = $request->postVar('move');
$field = $this->getSortField();

$list = $grid->getList();
$list = $grid->getList()->sort($field);
$manip = $grid->getManipulatedList();

$existing = $manip->map('ID', $field)->toArray();
Expand Down

0 comments on commit fbf7b86

Please sign in to comment.