You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show horizontal scrollbar to scroll horizontally #19
Is your feature request related to a problem? Please describe.
I am building a web app using flutter and for tables, I am using this package. The problem I am facing now is we are unable to show a working horizontal scrollbar on the table. If wrapped AdvancedPaginatedDataTable widget with ScrollBar widget, it shows the bar but upon dragging on it, it's not working. This feature is especially needed when a user does not have a trackpad or not working on mobile. There is no way to scroll horizontally.
Describe the solution you'd like
An inbuild scrollbar option in the widget would be great or any other solution will also help a lot for now.
Describe alternatives you've considered
No solution online working
Additional context
Need for a project to be delivered soon :(
Hey I can look into it but I would need some minimal example to make sure I debug the correct use case.
Did you check if this works for you in the meantime: #12
Yeah sure. Thank you for your response. Here is one demo app I have created to show the use case. Upon dragging on the scrollbar, it is not scrolling at all. It is intuitional to drag on the scrollbar for scrolling horizontally. I think it should work but it is not.
By using your example code I can drag the table horizontal or vertically without any issues. I don't see a scroll bar at all for the horizontal direction nor was I able to add one. Currently, I don't know how to help you as I have zero clue why we don't see the horizontal bar.
But I want to point out that dragging the table with my mouse, click down and move the cursor, works perfectly fine on web. It's not great but at least enables smaller screens to use it.
Thanks for the comment. It is scrolling when dragged on it as you mentioned, after implementing your solution. We are sticking to it for some time now.
Even I don't understand why is it showing scrollbar to me and not you. If I find any solution I'll let you know.
Hi, I'm struggling on inserting a scrollbar. I understand that you can use a Custom ScrollBehavior and use the mouse like a finger. But my solution requires a horizontal scrollbar. Do you happen to have a solution for this?
Hi @EyyyDous ,
We didn't look into it after sticking to use mouse for dragging horizontally. You can check if horizontal scrollbar is getting the touch input or is it getting absorbed by widget layer above it. It seems little complicated but we don't have any solution for it as of now.
@EyyyDous and @skohan I committed a version to the main branch that shows a horizontal scroll bar at the bottom of the table.
Please check if this would work for you. You can point your pubspec to the git repo as shown below:
Best I can do is now added, Flutter and scrolling is "special". You can set the showHorizontalScrollbarAlways to true to at least request it to be visible all time. Works well on desktop, for Web it's a bit strange once used it stays but it's now shown directly. Will prepare an update for pub.dev
Activity
Dev-Owl commentedon Jan 21, 2022
Hey I can look into it but I would need some minimal example to make sure I debug the correct use case.
Did you check if this works for you in the meantime: #12
skohan commentedon Jan 22, 2022
Yeah sure. Thank you for your response. Here is one demo app I have created to show the use case. Upon dragging on the scrollbar, it is not scrolling at all. It is intuitional to drag on the scrollbar for scrolling horizontally. I think it should work but it is not.
Dev-Owl commentedon Jan 23, 2022
By using your example code I can drag the table horizontal or vertically without any issues. I don't see a scroll bar at all for the horizontal direction nor was I able to add one. Currently, I don't know how to help you as I have zero clue why we don't see the horizontal bar.
But I want to point out that dragging the table with my mouse, click down and move the cursor, works perfectly fine on web. It's not great but at least enables smaller screens to use it.
skohan commentedon Jan 24, 2022
Thanks for the comment. It is scrolling when dragged on it as you mentioned, after implementing your solution. We are sticking to it for some time now.
Even I don't understand why is it showing scrollbar to me and not you. If I find any solution I'll let you know.
EyyyDous commentedon Jun 2, 2022
Hi, I'm struggling on inserting a scrollbar. I understand that you can use a Custom ScrollBehavior and use the mouse like a finger. But my solution requires a horizontal scrollbar. Do you happen to have a solution for this?
skohan commentedon Jun 2, 2022
Hi @EyyyDous ,
We didn't look into it after sticking to use mouse for dragging horizontally. You can check if horizontal scrollbar is getting the touch input or is it getting absorbed by widget layer above it. It seems little complicated but we don't have any solution for it as of now.
EyyyDous commentedon Jun 2, 2022
Thanks for the swift reply, I just hope my higher-ups accept this behavior.
Dev-Owl commentedon Jun 4, 2022
@EyyyDous and @skohan I committed a version to the main branch that shows a horizontal scroll bar at the bottom of the table.
Please check if this would work for you. You can point your pubspec to the git repo as shown below:
EyyyDous commentedon Jun 4, 2022
Will do. I will let you know if it would work, thank you.
EyyyDous commentedon Jun 6, 2022
Hi @Dev-Owl , it is working great. Thank you! Will you release it on pub.dev?
EDIT:
Scroll bar only appears if I scrolled by dragging my mouse. Ideal would be to hover the mouse to see the scroll bar.
Dev-Owl commentedon Jun 6, 2022
For sure pub.dev will get an update. Let me check if we can change the behaviour of both scrollbars to be the same. Will keep you posted.
#19 allow to set state for horizontal scrollbar
Dev-Owl commentedon Jun 16, 2022
Best I can do is now added, Flutter and scrolling is "special". You can set the
showHorizontalScrollbarAlwaysto true to at least request it to be visible all time. Works well on desktop, for Web it's a bit strange once used it stays but it's now shown directly. Will prepare an update for pub.devlublak commentedon Aug 4, 2023
@Dev-Owl currently i have some issues.


showHorizontalScrollbarAlwaysnot really works.It shows an overlap but no scrollbar.