cornflourblue / angu-fixed-header-table

AngularJS fixed header scrollable table directive
http://pointblankdevelopment.com.au/blog/angularjs-fixed-header-scrollable-table-directive
MIT License
67 stars 43 forks source link

"tbody" height should be calculated with "thead" and "tfoot" heights and maybe with margin. #18

Closed bodja closed 4 years ago

bodja commented 9 years ago

table of 100% height breaks down thead and tfoot displaying.

<div style="height: 100%">
    <table fixed-header style="height: 100%;">
    ....
    </table>
</div>

Suggestion: tbody.style.height = elem.offsetHeight - elem.querySelector('thead').offsetHeight - (elem.querySelector('tfoot').offsetHeight || 0) + 'px';