You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG: GridFieldOrderableRows interaction with GridFieldPaginator
Impacted version: 3.5.0
Re-ordering items across pages produces unexpected results.
Steps to reproduce
taxonomy group <- many many through (with Sort on through object) -> taxonomy term (also has a Sort column)
generate a taxonomy group with 200 taxonomy terms
navigate to a page (for example page 4)
drag an items to be reordered (for example item number 50) and drop it on the previous page icon in the paginator
Expected result
Item number 50 will be moved to the previous page while leaving all the items in the same place
Actual result
The list gets completely shifted with first 44 items leaving their place on the first page.
Screenshots
Notes
I haven't done too much investigation into this but it's possible that the random sort order is coming from the Sort column on the taxonomy terms. Maybe the re-order action gets confused on which DB column needs to be used when using the paginator reorder.
Normal reorder action within a single page works fine though.
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.
I think I've found the problem. The code that tried to figure out the new sort did not respect the original sort of the DataList. I've created a pull request for the 4.x branch: #418
johannesx75
pushed a commit
to johannesx75/silverstripe-gridfieldextensions
that referenced
this issue
Sep 25, 2024
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.
BUG: GridFieldOrderableRows interaction with GridFieldPaginator
Impacted version:
3.5.0
Re-ordering items across pages produces unexpected results.
Steps to reproduce
Sort
on through object) -> taxonomy term (also has aSort
column)4
)50
) and drop it on the previous page icon in the paginatorExpected result
Item number
50
will be moved to the previous page while leaving all the items in the same placeActual result
The list gets completely shifted with first 44 items leaving their place on the first page.
Screenshots
Notes
I haven't done too much investigation into this but it's possible that the random sort order is coming from the
Sort
column on the taxonomy terms. Maybe the re-order action gets confused on which DB column needs to be used when using the paginator reorder.Normal reorder action within a single page works fine though.
PRs
The text was updated successfully, but these errors were encountered: