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

Why endRowIndex and firstRowIndex are not passed to onVerticalScroll and onHorizontalScroll? #595

Open
manvydasu opened this issue Jul 7, 2021 · 2 comments

Comments

@manvydasu
Copy link

manvydasu commented Jul 7, 2021

Imagine someone is building a table, which supports infinite scroll and the amount of total rows is not known (hence the Infinite scroll example in examples folder would not work as it requires to know total amount of rows in advance). Currently, it would be possible to do that with onScrollEnd. However, the function only gets called after user stop scrolling and as result we can't fetch data in advance (lets assume we want to fetch additional data once user scrolls past 50% of visible rows).

There properties are already passed to "onScrollEnd". Shouldn't they also be passed to onVerticalScroll and onHorizontalScroll? Such change shouldn't break anything.

@pradeepnschrodinger
Copy link
Collaborator

Yea, passing the the first and last visible row index to onHorizontalScroll seems reasonable.

We'd be happy to accept a PR for this, or I'll try and put up a PR myself in the next few days.

@manvydasu
Copy link
Author

I'll make PR for this tomorrow in case it won't exist by then:)

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

No branches or pull requests

2 participants