-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs] Table virtualized #7450
Comments
We hope that the current API allow simple integration with |
Having an demo example in the docs would be awesome. |
This comment has been minimized.
This comment has been minimized.
@oliviertassinari I made it without I'm adding scroll debouncing, tweaking performance and fixing some glitch but it's working great: I'm "virtually" rendering about ~2400rows, sooo smooth. Questions on
is not returning the actual DOM container element of
which means using the deprecated
I hope to publish something stable about this soon so you can give a look it that's something which can be adopted in a general way. Sorry to bother this much but I'm heavily using mui@next so I'm spotting a lot of use-cases! |
Oh, that's a shame on us. Any idea what we could do to make is possible?
|
Actually is a mix of
|
|
Is the container of the rendered component a DOM element?
The catch-all solution I can think about is having
|
But what if Component C also have a rootRef property? So my answer, at first we introduced |
@damianobarbati Was react-virtual-list the experiment with Table and virtualization mentioned here? I'm guessing listComponent = TableBody, itemComponent = TableRow? |
I've started this project that uses react-virtualized with Material 1.0 you might be interested in. https://github.com/techniq/mui-table It's still a work in progress (see https://github.com/techniq/mui-table/blob/master/TODO.md) but might be useful to you. Docs are lacking but take a look at the stories to get a feel for how to use it. |
@techniq This looks promising 😄 ! I think it would be great to revamp the table documentation section at some point to have: We can also add it to the https://material-ui.com/discover-more/related-projects/#material-ui-specific-projects section. |
I have done a PR for cc: @kgregory |
@eyn nice work! I just finished up an implementation of an infinite-scrolling table using react-virtualized and material-ui. I hope to throw a gist together soon. When I do I will link it here for any future visitors of this issue and possibly as an example in the docs. |
@kgregory did you finished your gist? I'm still looking for a basic solution for virtualized Material UI table and it's not easy to find... It would be a great help! Thanks for your work! |
@Neofox No, sorry. I never got around to it, but your reply is a nice reminder. I will try to find time to put something together. |
@oliviertassinari your example in one of the first comments that supposedly shows how to use the material list with the react virtualized list is not working. Do you still have that example laying around? |
@mastertinner While I still use it (when virtualization is needed), I also use my newer mui-table when I don't need a virtualization, and can leverage the dom (using |
@rogerstorm funded this issue with $30. See it on IssueHunt |
@joshwooding I've done exact same thing what you've done, virtualized + fixed header(with scrollbar on body only). If your implementation uses two seperate
Well, the point is a component inside |
@worudso Currently it uses only one |
I've created a sandbox that demonstrates using material-ui and react-virtualized to produce a virtualized table. This particular example uses react-virtualized to size the Table to the height of the window. The
The My apologies for taking so long. I've been busy. |
FYI, there's now also |
@kgregory Thank you for sharing the codesandbox. @joshwooding Great demo. It's great to have a fixed header :). I hope you will be able to complete the implementation! Regarding the numeric forwarding, what's preventing you from applying directly on the cells? react-window vs react-virtualized |
@oliviertassinari I've set myself the goal of using the |
@oliviertassinari I've tried using HeaderRowRenderer but it looks like you can't pass custom props through it without manipulating the existing props since this is what is called to create the columns to pass through to the headerRenderer:
|
@oliviertassinari For a fixed height table you can just edit @kgregory's demo slightly: https://codesandbox.io/s/6vo8y0929k |
@joshwooding Looks great! I can't think of anything missing to make it an official demo. |
@issuehuntfest has funded $60.00 to this issue. See it on IssueHunt |
@oliviertassinari I'll work on implementing this :) |
@joshwooding has submitted a pull request. See it on IssueHunt |
@oliviertassinari has rewarded $81.00 to @joshwooding. See it on IssueHunt
|
Well deserved. Nice work @joshwooding! |
I have a similar need but for the List component...would the same approach work for making the list work? |
@mdizzy Yes, we could add a similar demo for the list. |
I am trying right now to make a list virtual with react-window (as the creator suggested to use it in place of virtualized if you don't need the full API, but in the end the API for a list doesn't really change that much) So far I have two big issues: I am going to probably try react-virtualized to see if they work better together |
@MastroLindus I assume you have tried our virtualization demo first? |
@oliviertassinari I started on my own way, found the problems I described above, googled for it, found this thread. Then I discovered about the virtualization demo, I checked its code and found out that is basically the same thing I am doing myself (only applied to Tables instead of lists). My issues are a bit more lists related. The general concept work, but stuff like icons, actions, sticky headers are not working properly. |
@MastroLindus What issues do we have with https://mui.com/material-ui/react-table/#virtualized-table? |
@oliviertassinari None. Regarding the lists: using ListItemSecondaryAction, ListItemIcon and ListSubheader (with sticky headers) doesn't seem to work, as their positioning gets messed up. |
@MastroLindus I think that you can move the discussion to #15149. |
@oliviertassinari would you consider to add a virtual container to the tbody to increase performance when rendering long lists without pagination?
I'll take a stab at this if you could just point me in the right direction (
react-virtualized
?)The text was updated successfully, but these errors were encountered: