Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to prev/next page functionality is broken #307

Closed
kinglozzer opened this issue Jun 1, 2020 · 2 comments
Closed

Move to prev/next page functionality is broken #307

kinglozzer opened this issue Jun 1, 2020 · 2 comments

Comments

@kinglozzer
Copy link
Collaborator

kinglozzer commented Jun 1, 2020

It looks to me like GridFieldOrderableRows::reorderItems() was updated from taking a list of IDs and putting them in order, to taking an associative array or pre-ordered sort/id values.

handleMovetoPage() currently generates an indexed array of IDs that are in the correct order, but as they don’t have any sort values reorderItems() doesn’t deal with them properly.

PRs

@joechamberlain1
Copy link

joechamberlain1 commented Feb 8, 2023

Hi, I'm still having an issue with this it seems the grid field order is still not behaving the way it should. Currently using silverstripe version 4.12 and PHP 8.0.

In a customised grid field as shown in the clip below shows some interesting behaviour. This grid has 3 pages of grid field items, all of which are given a letter as a title. Trying to move the 'z' grid to the next page moves it to the last page and also changes the order of most of the exisiting grid items. The 'z' grid item has also been moved to page 3 instead of 2. Moving it back to page 2 seems to work but then the item has moved slightly above the mouse and can't be dropped onto the page arrows.

Screen.Recording.2023-02-13.at.15.52.21.mov

GuySartorelli pushed a commit to kinglozzer/silverstripe-gridfieldextensions that referenced this issue May 15, 2024
GuySartorelli added a commit that referenced this issue May 15, 2024
FIX: Fixed move to prev/next page functionality (fixes #307)
@GuySartorelli
Copy link
Collaborator

PR merged. This will be automatically tagged by GitHub actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants