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

DataTable virtualScroll index bug #2431

Closed
primperfum opened this issue Nov 15, 2021 · 0 comments
Closed

DataTable virtualScroll index bug #2431

primperfum opened this issue Nov 15, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@primperfum
Copy link

primperfum commented Nov 15, 2021

There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeReact PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior

When scrolling my dataTable with virtualScroller (with preloaded data) from bottom to top there is a point where no data is present and there is no dataTable row displayed. When inspecting the issue it seems the problem happens when onScrollIndexChange event has e.first < 0 {first: -12, last: 79} scrolling further to top -> everything is back to normal when e.first >= 0 {first: 0 last: 72} . Don't know why and how it happens that e.first < 0.

Expected behavior
Data should be visible in any point when scrolling with virtualScroller. Make e.first not possible to be < 0, find why and fix the issue or just make it that if e.first < 0 then just use 0 with proper e.last translation. In my example would be just to use.

  • React version:

17.0.1

  • PrimeReact version:

7.0.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]
@mertsincan mertsincan self-assigned this Nov 19, 2021
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Nov 19, 2021
@mertsincan mertsincan added this to the 8.0.0 milestone Nov 19, 2021
@mertsincan mertsincan modified the milestones: 8.0.0, 7.1.0 Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants