-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DataTable: responsiveLayout="stack" and scrollable not working together #3693
Comments
Related to: #2479 |
@melloware any progress on that? i'm having this issue as well and its a key functionality for my data-tables |
I will see if I can look at it over the next couple of days. I think this is a valuable feature. |
I put together a PR and I tested it and it works perfectly. IT dynamically switches the scrollable state based on the |
I performed a quick test and it appears to be working. I am looking forward to it being merged. |
Thanks for testing! |
Hi all, Due to technical limitations, stack mode is deprecated in the new version. Please use responsiveLayout="scroll". #4078 Best Regards, |
@mertsincan i think a lot of people use Stack for responsive tables! |
Why does the stack mode not appear in the documentation? Friends do not go to make the little house to remove this responsive mode, one of my products uses this mode because first of all it is quite accessible and the information is super clean. I was going to upgrade to the latest version of the library but I cannot do it anymore :( |
Please reconsider this issue, its posible work with stack mode just using a simple media query |
Describe the bug
The DataTable component does not change to stack layout, after the window width reaches it's breakpoint, if the scrollable property is set to true, even if the responsiveLayout property is set explicitly to stack.
Reproducer
https://codesandbox.io/s/xenodochial-joliot-oh2wun?file=/src/demo/DataTableResponsiveDemo.js
PrimeReact version
8.7.2
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 90
Steps to reproduce the behavior
responsiveLayout
property tostack
.scrollable
property totrue
.Expected behavior
I think that the datatable should still respect the
responsiveLayout
property, even if thescrollable
property is set totrue
. The table should change it's layout from scroll, to stack, if the window is smaller than the breakpoint.The text was updated successfully, but these errors were encountered: