Previous & next arrow buttons on GridField detail forms are inconsistent.
Steps to Reproduce
Install the userforms module
Create a form with a field
Use the form on the page to create a few submissions
Browse those submissions with the CMS
Observe that despite there being submissions - the previous and next buttons are constantly disabled
Notes
I've had a little look at this. Not really sure what's causing it but by forcing GridField to run through all GridField_DataManipulator components before calling GridFieldDetailForm_ItemRequest::getAdjacentRecordID it seems to correctly get pagination state - the crux of this issue.
The problem then, however, is that setting the state from the request (in that same method) sometimes clears out the valid state with empty state. Wrapping it in an if(!empty) condition works but I'm not hugely familiar with this implementation.
Affected Version
>= 4.4.x
Description
Previous & next arrow buttons on GridField detail forms are inconsistent.
Steps to Reproduce
Notes
I've had a little look at this. Not really sure what's causing it but by forcing
GridField
to run through allGridField_DataManipulator
components before callingGridFieldDetailForm_ItemRequest::getAdjacentRecordID
it seems to correctly get pagination state - the crux of this issue.The problem then, however, is that setting the state from the request (in that same method) sometimes clears out the valid state with empty state. Wrapping it in an
if(!empty)
condition works but I'm not hugely familiar with this implementation.