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

Datagrid: Loading data with the loadData/updateDataset API does not honor the passed in activePage number and does not render the right rows #8677

Open
aaronpikkarainen opened this issue May 3, 2024 · 0 comments · May be fixed by #8743
Assignees
Labels
team: CSD Issues for the CSD team type: bug 🐛 [3] Velocity rating (Fibonacci)

Comments

@aaronpikkarainen
Copy link
Contributor

aaronpikkarainen commented May 3, 2024

Describe the bug
I found some problems with the DataGrid's loadData/updateDataset API involving paging, and I have a coding solution to fix them. That API call accepts a pagerInfo param with an "activePage" value. If no activePage is passed in, then page 1 is assumed (which is good). However, after going to page 2, then calling the loadData API, the pager will show the requested page number properly, but the grid will render the wrong page of rows.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://latest-enterprise.demo.design.infor.com/components/datagrid/test-large-dataset-performance.html
  2. Click on Load Data to get data in the grid
  3. Click Next Page to get to page 2
  4. Notice the grid renders the page 2 rows properly
  5. Now click on Load Data again
  6. Notice the pager shows "Page 1" (which is good), but the rendered rows are from page 2
    (A similar problem happens when passing in an "activePage" value)

Expected behavior
When using the loadData/updateDataset API, the grid should render the correct page of rows. If no activePage is passed in, then the grid should render page 1's rows. If an activePage is passed in, then the grid should render that page's rows.

Version

  • ids-enterprise: v4.94.2

Screenshots
image

Platform

  • Infor Application/Team Name: CSD
  • Device: Dell laptop
  • OS Version: Windows 11
  • Browser Name: Chrome
  • Browser Version: 124.0.6367.119 (Official Build) (64-bit)

Coding Solution
In datagrid.js find the loadData function and change line 1169 to be this (it fixes both issues):

if (this.pagerAPI) {
this.pagerAPI.activePage = pagerInfo.activePage || 1;

@tmcconechy tmcconechy added type: bug 🐛 [2] Velocity rating (Fibonacci) labels May 3, 2024
@AAlviar AAlviar added [3] Velocity rating (Fibonacci) team: CSD Issues for the CSD team and removed [2] Velocity rating (Fibonacci) labels May 8, 2024
@ericangeles ericangeles self-assigned this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: CSD Issues for the CSD team type: bug 🐛 [3] Velocity rating (Fibonacci)
Projects
Status: Ready For QA PR Review
Development

Successfully merging a pull request may close this issue.

4 participants