When setting the option responsive to scroll, the table automatically gets a max-height of 499px, why is that?
The reason I'm asking, is because I want to disable it, but it seems very intentional (see highlight below), so I'm afraid there's some side-effect to disabling it that I'm missing.
The max-height also seems to cause quite a lot of confusing elsewhere: https://github.com/gregnb/mui-datatables/issues/614, https://github.com/gregnb/mui-datatables/issues/580, https://github.com/gregnb/mui-datatables/issues/630, https://github.com/gregnb/mui-datatables/issues/234#issuecomment-463101548, https://github.com/gregnb/mui-datatables/issues/409, https://github.com/gregnb/mui-datatables/issues/378, https://github.com/gregnb/mui-datatables/issues/310
See https://github.com/gregnb/mui-datatables/issues/378#issuecomment-458112410
The principle reason to do this, in my view, is that it helps to make it clear that there is additional off-screen data when it overflows the page. This is a particularly bad UX issue when horizontal scrolling is needed also for a large numbers of columns, as it is very difficult to see that there is missing data, since the scrollbar will appear only at the bottom if there is no max-height, and may easily be missed by users.
It is easy to override this behavior, so I don't see that it is too much cause for concern, for those who wish to opt out of safer UX behavior or add their own behaviors.
I would consider reviewing an additional option to determine whether or not there is a max height set on scroll, if you want to work on that, but I don't want to change the default behavior at this point to avoid unnecessary breakage.
Okay, that makes sense.
I would consider reviewing an additional option to determine whether or not there is a max height set on scroll, if you want to work on that...
Can you elaborate on this, I'm not quite sure I follow? Are you suggesting another value to the responsive option, (like scroll-full), that works the same way as scroll, but without setting the max-height?
Yes, exactly, I was thinking an additional option to the responsive option. Options would be like this:
stacked: Unchanged from the originalscrollMaxHeight: Would be the option matching the original scroll, but changed in name for clarityscrollFullHeight: Would do out of the box what you and many others are looking for, where there is no max height setscroll: The default scroll option with max height set, as it is today. We would keep this for now, for the sake of backwards compatibility, but add a deprecation warning.Yeah that makes sense. I'll see if I get time to create a PR some times, otherwise anyone else is free to pick this up. (good candidate for a first time issue)
Is there any news?
@suren1525
I'm not working on this currently, and I don't believe anyone else is.
In the mean time, you can see https://github.com/gregnb/mui-datatables/issues/378#issuecomment-458112410 for a workaround
@JReinhold
Thank you for your prompt reply.
I'll take this on for the next release.
Most helpful comment
Yes, exactly, I was thinking an additional option to the
responsiveoption. Options would be like this:stacked: Unchanged from the originalscrollMaxHeight: Would be the option matching the originalscroll, but changed in name for clarityscrollFullHeight: Would do out of the box what you and many others are looking for, where there is no max height setscroll: The defaultscrolloption with max height set, as it is today. We would keep this for now, for the sake of backwards compatibility, but add a deprecation warning.