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 horizontal scroll trigger onVirtualScroll #677

Closed
cakienes opened this issue Dec 13, 2018 · 0 comments
Closed

Datatable horizontal scroll trigger onVirtualScroll #677

cakienes opened this issue Dec 13, 2018 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@cakienes
Copy link
Contributor

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

Plunkr Case (Bug Reports)
Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.

https://plnkr.co/edit/KraY9bXmw7epZOyQIXsa?p=preview

Current behavior
When there is data some data which is smaller then expected scrollHeight (Lets say there is only 1 row and scrollHeight is 200px), Datatable's onVirtualScroll function trigger when i scrolling horizontally.
You can check it on Plunkr.

Expected behavior
Datatable's onVirtualScroll function shouldn't trigger when i scrolling horizontal

Fix idea
When I check onBodyScroll function of ScrollableView, I found out you are not exclude scroll height of the scroll panel while you calculating viewport. It causes trouble. We shouldn't take offsetHeight, we should take clientHeight

Minimal reproduction of the problem with instructions
Please check Plunker
Please tell us about your environment:
Win-10(64bit),VS-Code, npm:6.4.1 node: v8.12.0

  • React version:
    React 16.4.2

  • PrimeReact version:
    Primereact 2.0.1

  • Browser: Chrome Latest, Firefox Latest

  • Language: all

@cagataycivici cagataycivici self-assigned this Dec 23, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a defect related to a specific component. label Dec 23, 2018
@cagataycivici cagataycivici added this to the 3.0.0-rc1 milestone Dec 23, 2018
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