Vuetify: [Bug Report] VDataTable shows sort selection in mobile view when disable-sort is true

Created on 9 Aug 2019  路  6Comments  路  Source: vuetifyjs/vuetify

Environment

Vuetify Version: 2.0.5
Vue Version: 2.6.10
Browsers: Chrome 75.0.3770.142
OS: Mac OS 10.13.0

Steps to reproduce

Put disable-sort into VDataTable and switch to mobile view

Expected Behavior

Must not render sort select on mobile view at:
https://github.com/vuetifyjs/vuetify/blob/6de09720c91f283b994fc331d9a02c5063876b4b/packages/vuetify/src/components/VDataTable/VDataTableHeaderMobile.ts#L84

Actual Behavior

VDataTable with property disable-sort generates sort selection in mobile view

Reproduction Link

https://codepen.io/yariksav/pen/zgJyrG

VDataTable

Most helpful comment

You can hide them only for mobile, just bind a boolean. I wonder if it could accept other values than bools, for example hide-default-header="mobile". Otherwise you need to apply the condition so either you need to know when the table switches to mobile by default or you need to duplicate the value of mobile-breakpoint prop.
@nekosaur thoughts?

All 6 comments

I'd say it's intended. To disable means to disable, not to hide, if you want to hide there's hide-default-header for this.
You may want to disable sort when for example you're loading data and you don't want the layout to jump.

Understand, but property hide-default-header hides header at all, even in not mobile mode. In desktop mode header is necessary.

You can hide them only for mobile, just bind a boolean. I wonder if it could accept other values than bools, for example hide-default-header="mobile". Otherwise you need to apply the condition so either you need to know when the table switches to mobile by default or you need to duplicate the value of mobile-breakpoint prop.
@nekosaur thoughts?

hmm. well any changes to how hide-default-header or disable-sort works would be a (potentially) breaking feature request. for now I'd say this is working as intended?

This is working as intended. Easy to solve in userland.

If you have any additional questions, please reach out to us in our Discord community.

I'd say it's intended. To disable means to disable, not to hide, if you want to hide there's hide-default-header for this.
You may want to disable sort when for example you're loading data and you don't want the layout to jump.

Sorry, I think to disable sort and display the sort menu on mobile which makes no sense

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronjpitts picture aaronjpitts  路  3Comments

efootstep picture efootstep  路  3Comments

Webifi picture Webifi  路  3Comments

KuroThing picture KuroThing  路  3Comments

Antway picture Antway  路  3Comments