Skip to content

Conversation

qili26
Copy link
Contributor

@qili26 qili26 commented Nov 15, 2019

scrollReachBottom

@qili26 qili26 self-assigned this Nov 15, 2019
.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 Author

Choose a reason for hiding this comment

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

Add small space between the bottom row and the bottom border, as the editable small square will increase the height size a little bit, so it's better to leave the margin in advance to avoid some randomly bug that a cell cannot be edited.

image

}, [rowHeight, scrollToRowIndex]);

useEffect(() => {
if (scrollTop + clientHeight - rowHeight * rowsCount === 8) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

}

export interface ScrollOption extends ScrollPosition {
reachedBottom?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might want to revisit the API name, but I believe this should be a reasonable API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or should I add a stand alone API like onReachedBottom to be explicitly?

@nstepien
Copy link
Collaborator

nstepien commented Dec 5, 2019

Why not just surface the scroll event object, then users can just check for themselves:

event.target.clientHeight + event.target.scrollTop === event.target.scrollHeight

@qili26
Copy link
Contributor Author

qili26 commented Dec 27, 2019

blocked by #1852

@qili26
Copy link
Contributor Author

qili26 commented Jan 2, 2020

Superseded by this #1854

@qili26 qili26 closed this Jan 2, 2020
@qili26 qili26 deleted the ql-lazy-loading branch January 2, 2020 19:21
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