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

Random behaviour for grid field next and previous button. #1006

Closed
roopamjain01 opened this issue Feb 6, 2020 · 2 comments
Closed

Random behaviour for grid field next and previous button. #1006

roopamjain01 opened this issue Feb 6, 2020 · 2 comments

Comments

@roopamjain01
Copy link

roopamjain01 commented Feb 6, 2020

My Silverstripe version is 4.4 and grid field next and previous button functionality working randomly.

I have grid with 25 records. I have two pages in my grid, means item per page is 15 in the grid.

When I click on first record on the first page in the grid, I can press next button till the 16th record and then next button is disabled on the 17th record.

But when I start from second page in the gird from 18th number record then next record should be the 19th number record but currently after 18th record I am getting 2nd number record as a next record and after that I can see next button till the 16th record and on the 17th record again next button is disabled.

In my case I expect next button should work for all the 25 records in the grid and next button should be disabled on the 25th record. But next button disabled after 17th records according to the current code in GridFieldDetailForm_ItemRequest.php at line 540($limit = $itemsPerPage + 2).

In second senario, when I click on the 15th number of record on the page 1, I can see next button only for 15th and 16th record and then again next button is disabled on the 17th record, but I think I should be able to see all the record from 15th to 25th (all 10 recods) and next button should be enabled.

Same issue with previous button as well, when I click on the 25th number record on page 2, I can see previous button till 16th record and then previous button is disabled on 15th record on page 1. But I expect previous button should work till first record in the grid.

Please let me know If you need any other information.

@roopamjain01 roopamjain01 changed the title Grid field next and previous button working randomly. Random behaviour for grid field next and previous button. Feb 6, 2020
@brynwhyman
Copy link

Hi @roopamjain01 thanks for raising this issue. The bugs you're experiencing have already been raised in the following issue: #886

Do you mind adding your notes to that issue and closing this one? Thanks!

@roopamjain01
Copy link
Author

roopamjain01 commented Feb 7, 2020

Moved the issue detail in the issue: #886

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

No branches or pull requests

2 participants