vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Enhancement] Fixed DataTable Headers

Open JacksMyth opened this issue 9 years ago • 68 comments

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>

JacksMyth avatar Aug 31 '17 12:08 JacksMyth

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. :)

smares avatar Aug 31 '17 14:08 smares

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

haggys22 avatar Sep 01 '17 07:09 haggys22

Is anyone working on this at this moment? if not, I will give it a try

ckitt avatar Sep 15 '17 04:09 ckitt

:+1:

nekosaur avatar Sep 15 '17 09:09 nekosaur

This feature will be achieved in 1.0 version ?

shihanjun19 avatar Dec 17 '17 05:12 shihanjun19

Especially useful if the outside layout is fixed as in many of the examples: https://vuetifyjs.com/layout/pre-defined

mizzao avatar Dec 19 '17 00:12 mizzao

Any progress on this? :(

guyschlider avatar Dec 28 '17 10:12 guyschlider

@mp3il pull request has been created, pending for review

ckitt avatar Dec 28 '17 11:12 ckitt

@ckitt thats awesome! will try to use it in our project until they merge it to master etc..

guyschlider avatar Dec 28 '17 12:12 guyschlider

Dear owners and contributors, we really need that feature!

sentbyravens avatar Dec 29 '17 13:12 sentbyravens

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.

juhasev avatar Jan 11 '18 23:01 juhasev

The fixed header and fixed column is one of the most useful features on systems with a large dataset.

bsas avatar Jan 17 '18 00:01 bsas

And also the fixed table action

bsor-dev avatar Jan 25 '18 03:01 bsor-dev

@ckitt thanks for providing the PR. Any update on the status of this?

takotuesday avatar Feb 22 '18 18:02 takotuesday

+1 would love to see this merged, would benefit our reporting app massively

binzcodes avatar Feb 22 '18 19:02 binzcodes

unfortunately his PR is still open. see here: https://github.com/vuetifyjs/vuetify/pull/2868

dmitrij-schmidt avatar Feb 22 '18 20:02 dmitrij-schmidt

Dear owners and contributors, we really need that feature!

aaron0713 avatar Mar 22 '18 07:03 aaron0713

I really need this

renatosistemasvc avatar Mar 24 '18 14:03 renatosistemasvc

Actually all you need to do is set CSS

  1. max-height: (something that fits to the screen that you want
  2. overflow-y: auto

however, easier said than done, if they can allow use to configure those, it would help...

ais-one avatar Mar 25 '18 04:03 ais-one

@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

renatosistemasvc avatar Mar 25 '18 05:03 renatosistemasvc