-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug Report][3.6.1] VDataTable mobile mode is based on screen width, not container width #19726
Comments
Adding a couple screenshots to illustrate my point: with the vuetify docs site itself, at 1280x720, the example table is perfectly readable: When I reduce the viewport by 1px, the table goes into mobile mode, which now makes the page completely unreadable as the rest of the page is still designed for desktop mode: |
You can set the Basic example |
Thanks. Yes, I understand that this can be adjusted or disabled manually so a workaround exists. I'd still consider this a bug though since it's not working "as advertised". I think it makes the most sense for the mobile layout to be disabled by default and only enabled if a breakpoint is explicitly set. Other components such as stepper is already done this way. There are a few reasons for it:
|
You do make some good points to be considered. |
Environment
Vuetify Version: 3.6.1
Last working version: 3.5.18
Vue Version: 3.4.26
Browsers: Firefox 125.0
OS: Windows 10
Steps to reproduce
I've included two tables in the playground. Resize the playground preview window to see the effects. When the preview window is under 1280px wide (the now-default mobile breakpoint), both tables go into mobile mode.
Expected Behavior
The table goes into mobile mode when the table itself is below a certain specified width.
Mobile mode should be disabled by default to ensure backwards compatibility.
Actual Behavior
The table goes into mobile mode based on the viewport size, regardless of its own size.
Mobile mode is enabled by default under 1280px viewport size
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
I don't think it should be an assumption that VDataTable always matches page width - most sites do not have it covering the whole screen edge-to-edge.
This change is causing some of my apps to now display mobile table on desktop with no code change, and since it only applies to certain screen sizes, it's very easy to miss by the dev. The width of 1280px may also be too wide since it's easy to go under that on desktop browsers or especially in something like an electron app.
The text was updated successfully, but these errors were encountered: