Comments (4)
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:
from vuetify.
You can set the mobile
prop to false and it will disable it. You can also specifically set which breakpoint it should break to mobile by setting the same prop using useDisplay
. 1280 is a default mobile size so that is correct, so personally I like to set it as smAndDown
.
Basic example
from vuetify.
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:
- DataTable isn't a page layout component and don't have to scale with the screen, so it doesn't make sense to change layouts based on the viewport size. The desktop and mobile layouts are also significantly different which means they may require separate design attention. This is what sets it apart from most other automatically-responsive components like nav drawer, toolbar, etc.
- The breakpoint isn't one-size-fits-most unlike other components. What fits in a certain width varies depending on the content inside. So picking 1280px arbitrarily is counter-productive since this default isn't necessarily "better most of the time".
- It's more likely for someone to leave the default in by accident, than actually wanting the default behavior. Someone designing for mobile would be already testing at different sizes and setting breakpoints anyways. But someone who doesn't care about mobile likely won't even know the mobile layout is a feature, and end up leaving it in resulting in a bug down the line.
- It's also a silent behavior change from 3.5, so it can easily be added to existing apps by accident.
from vuetify.
You do make some good points to be considered.
from vuetify.
Related Issues (20)
- [Bug Report][3.6.3] ref behaviour changed HOT 5
- [Bug Report][3.6.3] The font-weight of the header of the data-table differs between the normal and the mobile version HOT 1
- [Bug Report][3.6.3] Tooltip directive modifiers don't work
- [Feature Request] Simplify defaults assignment for input like components (textfields, selects, autocompletes, etc.) HOT 3
- [Bug Report][3.6.3] Expand transition occasionally throwing error
- [Bug Report][3.6.3] VDataTableServer - on mobile - is ignoring #headers slot HOT 2
- [Feature Request] VConfirmEdit - expose dirty/pristine status
- [Bug Report][3.6.0-alpha.0] data table sort field in header is always showing in version 3.6.0 and higher HOT 3
- [Bug Report][3.6.3] v-tooltip doesn't work with Nuxt 3 HOT 3
- [Bug Report][3.6.3] VTabs scoped class doen't works HOT 2
- [Bug Report][3.6.3] VTabs attribute inheritance runtime warning
- [Bug Report][3.6.3] VDialog location and offset props do not affect dialog HOT 2
- [Bug Report][3.5.15] Combobox does not work properly with type date/month HOT 2
- [Bug Report][3.6.3] labs/number inputs (v-input-number) unable to tab out of control HOT 1
- [Bug Report][3.6.3] VDefaultsProvider doesn't work with local component HOT 1
- [Feature Request] Simplify v-img error slot usage
- [Bug Report][3.6.3] Dropdown menu list does not update for v-select with eager props
- [Bug Report][3.6.3] VMenu: Invalid default value for aria-expanded HOT 3
- [Bug Report][3.6.3] VMenu dismisses on enter keypress when inner textarea is focused
- [Bug Report][3.6.4] Error in v-text-field size when using slot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetify.