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

Created on 5 Nov 2018  Â·  4Comments  Â·  Source: infor-design/enterprise

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.

[3] type patch

All 4 comments

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

Landmark requested this be patched back to 4.12.x

✅ Confirming to patch into 4.12.x

This was patched and can be closed

Was this page helpful?
0 / 5 - 0 ratings