Skip to content
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

Change scrolling approach for Table component #1832

Open
rzinnatullin opened this issue Mar 21, 2024 · 0 comments
Open

Change scrolling approach for Table component #1832

rzinnatullin opened this issue Mar 21, 2024 · 0 comments

Comments

@rzinnatullin
Copy link

rzinnatullin commented Mar 21, 2024

Feature Request

The Table component has quite an annoying problem - it doesn't allow horizontal scrolling. I think a lot of people got into the trap due to this issue.
Even though the Table is not designed to be horizontally scrollable, developers don't believe that it's indeed not scrollable at all. That's a big surprise to find out later that it's really not horizontally scrollable, even 1 px - no. Personally I thought that the Table simply doesn't support column virtualization, but not really ability to scroll horizontally.

I checked how the Table's scrolling works. It appears that the scollable area includes only data rows, but doesn't include the header row.

Ok, I tried to add a horizontal scrollbar in the scrollable area, but obviously this won't work, because header won't scroll. Well, we can try to subscribe to scrolling events and programmatically scroll the header area, but that won't work well, because the header will have a scrolling lag (as in the MultiGrid with fixed rows).

Then I tried to add a horizontal scrollbar to a parent (which contains the Table) container. But this also doesn't work, because the inner vertical scrollbar obviously gets out of the visible parent area if there's something to scroll horizontally.

So, I suggest changing the Table's scrolling approach so that the scrollable area includes the header, and make the header sticky (with position:sticky).

With this change, we can enable the horizontal scrollbar right in the scrollable area of the Table.

Probably there was a reason why this wasn't done in the first place, but still I dared to add this feature request :)

We can use MultiGrid instead of Table, but hey... doesn't it look ironic that we should use MultiGrid to simulate Table? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant