Skip to content

Extend onScroll API #1854

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

Closed
wants to merge 3 commits into from
Closed

Extend onScroll API #1854

wants to merge 3 commits into from

Conversation

qili26
Copy link
Contributor

@qili26 qili26 commented Jan 2, 2020

  1. Add event in the onScroll api for endless scrolling.

lazyloading

@qili26 qili26 self-assigned this Jan 2, 2020
@qili26 qili26 changed the base branch from next to pre-canary January 2, 2020 19:21
@qili26 qili26 marked this pull request as ready for review January 2, 2020 20:05
@qili26 qili26 requested review from nstepien and amanmahajan7 and removed request for nstepien January 2, 2020 20:05
Copy link
Contributor

@nstepien nstepien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, what's the point of this? We already do lazy row loading with rowGetter.

@@ -29,4 +29,5 @@
.rdg-grid {
// min-height is here to show the horizontal scrollbar when there are no rows
min-height: 1px;
margin-bottom: 8px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could break anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this doesn't break anything, and in fact this fixes a jumping issue that if the last row cells are editable, and when you click on it, the the drag square will push the rows above a little bit.

@qili26
Copy link
Contributor Author

qili26 commented Jan 3, 2020

They all called lazy loading, but this one is data focused. Maybe endless scrolling would be a better term. The real use case is like you only want to pull 100 records initially from an API and pull another 100 records from the same API call (or may be another) when the scroll bar reaches the bottom.

@nstepien
Copy link
Contributor

nstepien commented Jan 3, 2020

You could just trigger loading in rowGetter when the row number requested is close or at the rows.length.

@qili26
Copy link
Contributor Author

qili26 commented Jan 3, 2020

Aren't we going to deprecate the rowGetter and passing all the rows into the grid?

@nstepien nstepien closed this Jan 17, 2020
@qili26 qili26 deleted the ql-lazy-loading-2 branch April 21, 2020 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants