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

Indeterminate paging - Previous page button fails to message source fn when initially loading last page [v4.12.x] #1162

Closed
pwpatton opened this issue Nov 5, 2018 · 4 comments
Assignees
Labels
type: bug 🐛 type: patch [3] Velocity rating (Fibonacci)
Milestone

Comments

@pwpatton
Copy link
Contributor

pwpatton commented Nov 5, 2018

Describe the bug
indeterminate paging - previous page button fails to message source function when initially loading last paging

To Reproduce
Steps to reproduce the behavior:

  1. In the example-paging-indeterminate-landmark.html in getDataPage change 'initial' req.type case to fall through to the 'last' req.type case.
       switch (request.type) {
          case 'first':   beginIndex = 0; break;
          case 'initial':   // <--- *NOTE*: Move 'initial' req.type to appear here and fall through to the last  req.type case.
          case 'last':    beginIndex = getData().length - request.pagesize; break;
          case 'next':    beginIndex = beginIndex + request.pagesize; break;
          case 'prev':    beginIndex = beginIndex - request.pagesize; break;

          case 'sorted':   console.log('sorted stub called - implement me'); break;
          case 'filtered': console.log('filtered stub called - implement me'); break;
        }
  1. Go to http://localhost:4000/components/datagrid/example-paging-indeterminate-landmark.html
  2. Click on previous page button
  3. Notice no data changes and first and prev paging buttons become disabled.

Expected behavior
Previous button should message the source(reqType === 'previous') callback function.

Screenshots
If applicable, add screenshots to help explain your problem.
prevpage

Platform

  • PC
  • Windows 10
  • chrome

Additional context
Add any other context about the problem here.

@tmcconechy tmcconechy added type: bug 🐛 [3] Velocity rating (Fibonacci) labels Nov 5, 2018
@pwpatton
Copy link
Contributor Author

pwpatton commented Nov 5, 2018

Note, this all works fine unless you initially load the datagrid with the last page of records.

@tmcconechy tmcconechy self-assigned this Nov 5, 2018
@tmcconechy
Copy link
Member

Landmark requested this be patched back to 4.12.x

@clepore clepore added this to the QA: v4.12.0 milestone Nov 6, 2018
@clepore clepore removed this from To do in Enterprise November Sprint Nov 6, 2018
@clepore clepore added this to In progress in Enterprise November Sprint Nov 6, 2018
@clepore clepore changed the title indeterminate paging - previous page button fails to message source function when initially loading last paging Indeterminate paging - Previous page button fails to message source fn when initially loading last page Nov 6, 2018
@clepore
Copy link
Contributor

clepore commented Nov 6, 2018

✅ Confirming to patch into 4.12.x

@clepore clepore changed the title Indeterminate paging - Previous page button fails to message source fn when initially loading last page Indeterminate paging - Previous page button fails to message source fn when initially loading last page [v4.12.x] Nov 6, 2018
@tmcconechy tmcconechy moved this from In progress to Done in Enterprise November Sprint Nov 7, 2018
@tmcconechy
Copy link
Member

This was patched and can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 type: patch [3] Velocity rating (Fibonacci)
Projects
No open projects
Development

No branches or pull requests

3 participants