[Enhancement] Fixed DataTable Headers
What will it allow you to do that you can't do today
It will allow you to have scrollable tables with fixed / sticky header, which is becoming more and more popular. It'll also give a polished feel to the application. See https://codepen.io/anon/pen/qbLaMb?editors=101
How will it make current work-arounds straightforward?
To fix the headers in datatables, some hacks are likely needed right now. This will reduce the need for hacks
Something like a "fix-header' prop would be amazing:
<v-data-table
v-bind:headers="headers"
:items="items"
fix-header
></v-datatable>
To be honest, this is one of the cool features of Element's tables. Not only can you have fixed headers, but also fixed columns: http://element.eleme.io/#/en-US/component/table#table-with-fixed-column Would really love to see this feature, too. :)
Both examples provided make the header fixed by making the body scrollable. I'd like the body to scroll with the page and the header still being fixed as shown in https://codepen.io/jgx/pen/wiIGc (from https://stackoverflow.com/a/22996338) or http://jsfiddle.net/jmosbech/stFcx/ (from https://github.com/jmosbech/StickyTableHeaders)
IMO it would be awesome to be able to choose between both solutions by either setting a height attribute on the table like Element's tables or adding a fix-header prop as proposed by @JacksMyth
Is anyone working on this at this moment? if not, I will give it a try
:+1:
This feature will be achieved in 1.0 version ?
Especially useful if the outside layout is fixed as in many of the examples: https://vuetifyjs.com/layout/pre-defined
Any progress on this? :(
@mp3il pull request has been created, pending for review
@ckitt thats awesome! will try to use it in our project until they merge it to master etc..
Dear owners and contributors, we really need that feature!
This would be totally awesome! I have a table that will not even fit into my ultra-wide screen! This also means you really need to really watch how many items go into the table or things like action buttons maybe pushed outside the visible screen. Also it is not clear to the user that the table has additional items outside the visible screen.
The fixed header and fixed column is one of the most useful features on systems with a large dataset.
And also the fixed table action
@ckitt thanks for providing the PR. Any update on the status of this?
+1 would love to see this merged, would benefit our reporting app massively
unfortunately his PR is still open. see here: https://github.com/vuetifyjs/vuetify/pull/2868
Dear owners and contributors, we really need that feature!
I really need this
Actually all you need to do is set CSS
- max-height: (something that fits to the screen that you want
- overflow-y: auto
however, easier said than done, if they can allow use to configure those, it would help...
@ais-one it's not just defining css You need to use display block (or something like that) to keep the header at the top when scrolling. The problem is that in the table this property separates the header from the body.
width of the header columns does not follow the width of the body columns. You need to use javascript to be able to do this work well