icflorescu / mantine-datatable

The table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, context menus, nesting, Gmail-style batch row selection, dark theme, and more.
https://icflorescu.github.io/mantine-datatable/
MIT License
903 stars 65 forks source link

Adding virtualisation for the table #179

Closed viveknigam3003 closed 1 year ago

viveknigam3003 commented 1 year ago

Is your feature request related to a problem? Please describe.

I've been using this library for my project and found that there is no virtualisation available. We used a basic <div> like structure to render a list of items with react-window for performance purposes. Using mantine-datable is a delight, but then I could not find a way in which I can virtualise the list for handling large amounts of rows and columns. Our table has continuous pagination (infinite scrolling type) so virtualisation makes for a very strong use case.

Describe the solution you'd like

I explored other libraries like TanStack Table and it seems to have virtualisation enabled. If there could be a way to virtualise the rows it would do the job of handling extensive data without making the DOM heavy.

Describe alternatives you've considered N/A

Additional context N/A

aaly00 commented 1 year ago

+1

alexandersimoes commented 1 year ago

+1

icflorescu commented 1 year ago

Guys, this has already been discussed a number of times :-) I'm fully aware of the benefits of virtualization, and I'm more than open to review/accept a PR implementing virtualization in a way that plays nicely with all the other features...

alexcastrodev commented 1 year ago

@icflorescu

I can work on it.

My question is, there are many ways to solve this:

I suggest windowing, because intersection Observer is new and maybe will be needed pollyfill.

We can use react-window or react-virtualized

what you think ?

PS: What you think to having Discord channel for this project?

alexcastrodev commented 1 year ago

@icflorescu ?

icflorescu commented 1 year ago

Hey @AlexcastroDev, sorry for being unable to reply sooner, but I'm currently pretty caught-up in a deadline. I don't have experience with any of them, but at the first glance react-window seems the obvious logical choice.

So, yes, if you're up to it and have the time, feel free to have a go at it, I'd be happy to support in any way I can (though, as stated above, I'm currently under a bit of pressure) and your PRs are more than welcomed.

I have built a few other open-source projects besides mantine-datatable over the last years and learned that - while lots of users would come up with feature requests or how-to questions - very few are willing and/or able to contribute their own effort :-)

About setting up a discord channel for the project, yes, I did thought about it a while ago, but again, couldn't find the time to do it...