Scroller and Child rows compatibility
Scroller and Child rows compatibility
Being able to use scroller to optimize very large tables is awesome, as is being able to expand rows to show more of the rows data or even pseudo-hierarchies. Not being able to do both at the same time means having to sacrifice peformance or usability (eg. modal instead of in context display, or no scroller).
Is there any plan to let us 1) Update scroller on the fly to account for child rows? Or 2) Support vertical resize, which I mean as changing scrollY on the fly? I'm aware that we can set scrollY to certain vh
value for example, but often that's not granular enough in a world were we embed tables to PWAs that expand to device size which can change on the fly. Current workaround for me is to completely reset the datatable if height changes, which is suboptimal.
Answers
I also use scrollY with
dvh
as well! But have to reset the table in order to change that.Regarding the Scroller, I did some tests and made demo examples on https://datatables.net/forums/discussion/80158, for performace suggestions.
Not at this time. I actually don't think it is possible, and I don't really like saying that about software problems. Scroller's calculations are purely based on knowing the row height (all rows must be the same height) and how many rows there are. If anything knocks that off, then the virtual position calculations simply can't work. A child row would introduce extra height, which would mess with those calculations.
The only way to do it would be to know the height of the child row, and if the child row should be shown. But then the calculations are a lot more complex than simply
rowHeight * position = row
.Scrolling without Scroller has no problem with any of this - but Scroller does virtual domain calculations to support large data sets in a single scrollable list.
Will this suit your needs?
Allan