question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data Table to have a scroll event like Async Unfinite Scroll.

See original GitHub issue

This function solves the problem (这个功能解决的问题)

Like for example I scroll to the very end of the data, then It will fetch others data and be pushed on the data.

Expected API (期望的 API)

maybe add an event handler, where it fires when the datatable is scrolled on the very end.

<NDataTable ... @scrolledToEnd="myFunction()" />

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
07akionicommented, Mar 5, 2022

I’m using data-table to display a possibly very long list of data that’s too expensive to fetch from the server in a single request (and store it in the browser) and while I could use pagination, an “infinite” scroll would provide much better user experience in this case.

If there are tons of lines, for example 5000, what’s the meaning of scroll? Scrolling down from 0, can they wait for async loading for 5000 items? If so it’s probably one the first XXX(maybe 500 at most) lines are valuable for user.

I think we can fetch like 15 rows, everytime a user scrolls to the end. Or 50 rows etc.

If only 15 rows are visible for users. Why not just using pagination.

I mean there are many interactions we can choose for data-table. However adding it will introduce unneccessary complexity of implementation and maintaining. It’s already very complex now. So we will only add it for a reasonable realword application.

1reaction
07akionicommented, Mar 1, 2022

I’m using data-table to display a possibly very long list of data that’s too expensive to fetch from the server in a single request (and store it in the browser) and while I could use pagination, an “infinite” scroll would provide much better user experience in this case.

If there are tons of lines, for example 5000, what’s the meaning of scroll? Scrolling down from 0, can they wait for async loading for 5000 items? If so it’s probably one the first XXX(maybe 500 at most) lines are valuable for user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data Table to have a scroll event like Async Unfinite Scroll.
This function solves the problem (这个功能解决的问题) Like for example I scroll to the very end of the data, then It will fetch others...
Read more >
How to implement JS infine scroll - asynchronous
The scroll function basically only checks whether there are enough hidden rows (cache) above or below the table. If it reaches the threshold,...
Read more >
building a ReactJS Infinite scroll datatable from scratch
[ GET MENTORED] Level up your skills with one on one private mentorship via Zoom! https://bit.ly/3lz4FdHToday we build a sortable datatable...
Read more >
Infinite Scrolling Example - Material React Table Docs
An infinite scrolling table is a table that streams data from a remote server as the user scrolls down the table. This works...
Read more >
I need example for Infinite Scroll(Load data on scroll)
Hello All, I need an example for Infinite Scroll. For example: - At first, there are 20rows in datatable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found