Skip to content

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 amanmahajan7 and nstepien and removed request for nstepien January 2, 2020 20:05
Copy link
Collaborator

@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.

.rdg-grid {
// min-height is here to show the horizontal scrollbar when there are no rows
min-height: 1px;
margin-bottom: 8px;
Copy link
Collaborator

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
Collaborator

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