Skip to content
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

Scrolling table with fixed headers #41

Closed
esheffield-ivantage opened this issue Jul 16, 2013 · 31 comments
Closed

Scrolling table with fixed headers #41

esheffield-ivantage opened this issue Jul 16, 2013 · 31 comments
Labels

Comments

@esheffield-ivantage
Copy link

Something like this: http://www.imaputz.com/cssStuff/bigFourVersion.html

I've looked at a lot of different discussions about how to accomplish this, either through plug-ins or using CSS, but so far nothing I've found has worked quite how I would like it. My primary problem with the CSS approach is that having to apply the display: block; property breaks the formatting of the table, making it look ugly and unable to resize with the window. Is this a feature you've ever considered adding to ng-table? If not, do you know of the best way I can achieve this?

@esvit
Copy link
Owner

esvit commented Jul 21, 2013

No, i don't know how do this and i haven't plan do this feature. It is not easy functionality

@esvit esvit closed this as completed Jul 21, 2013
@rconrad
Copy link

rconrad commented Jan 22, 2014

+1, this functionality would make ngTables so incredible compared to ng-grid or others that try to do the same.

@jack-kerouac
Copy link

I am specifically looking for this feature. I found an (ugly) way to make it work with ng-grid. Angular-table supports it out of the box.
This would be a great feature, though I acknowledge that it is not easy.

@Diego81
Copy link

Diego81 commented May 9, 2014

+1

3 similar comments
@benn0r
Copy link

benn0r commented May 15, 2014

+1

@pursual
Copy link

pursual commented May 15, 2014

+1

@lyon-liao
Copy link

+1

@jvanderbiest
Copy link

I've implemented this using a jquery plugin (https://github.com/jmosbech/StickyTableHeaders).

There is a plunkr here: http://plnkr.co/edit/KyilXo?p=preview

@wherpoelaert
Copy link

+1

6 similar comments
@divramod
Copy link

+1

@terencevs
Copy link

+1

@gitnik
Copy link

gitnik commented Feb 9, 2015

+1

@lee-40square
Copy link

+1

@brunoosilva
Copy link

+1

@ghost
Copy link

ghost commented Mar 13, 2015

+1

@andrewboni
Copy link

Definitely +1 on this

@arthur-kv
Copy link

+1

1 similar comment
@anthony-o
Copy link

+1

@lindelleric
Copy link

+1

3 similar comments
@dmoskovtsov
Copy link

+1

@schmidtl
Copy link

+1

@incadoi
Copy link

incadoi commented Jun 24, 2015

+1

@sagarbhosale91
Copy link

I'm using angular js ng-table to display some information. I would like to make the header of the ng-table fixed with scroll bar.Moreover I need to place one accordion just before the ng-table.

When I collapse the accordion my ng-table fixed header does not work properly. Please refer plunker I have created : http://plnkr.co/edit/FGjU46cCMuhIdyacffHl?p=preview

@RomainGx
Copy link

+1

@sagarbhosale91
Copy link

Resolved with accordain ... Demo 👍 http://plnkr.co/edit/D5XxfgH79bR2wVDhPlku?p=preview

@corbinolds
Copy link

The plugin works fine for keeping the header in place, but when resizing the page, the header retains the same width until the page is refreshed or the table is scrolled back to the top.

When looking at the accordion plunker, when i scroll down in the table and resize the page width, the header keeps the same size it had as when the page wasn't resized. http://plnkr.co/edit/FGjU46cCMuhIdyacffHl?p=preview

@devLaaziz
Copy link

+1

2 similar comments
@lessu
Copy link

lessu commented Jul 7, 2016

+1

@SmallDev
Copy link

SmallDev commented Sep 2, 2016

+1

@theaspect
Copy link

theaspect commented Oct 12, 2016

Whoever find this, use https://github.com/jmosbech/StickyTableHeaders works out of the box with this directive:

.directive "stickyHeader", ["$timeout", ($timeout)->
  restrict: 'A'
  link: (scope, element, attrs) ->
    $timeout(() -> $(element).stickyTableHeaders())
]

@chrispyliang
Copy link

here is an approach with pure css

tbody {
    max-height: 200px; 
    overflow-y: scroll;
    display: block;
}

thead, tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests