Skip to content

Commit 5a8f03b

Browse files
committed
Added optional tableHeight parameter
Added optional tableHeight parameter, defaults to 400px
1 parent ac8678b commit 5a8f03b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

angu-fixed-header-table.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
.directive('fixedHeader', ['$timeout', function ($timeout) {
99
return {
1010
restrict: 'A',
11+
scope: {
12+
tableHeight: '@'
13+
},
1114
link: function ($scope, $elem, $attrs, $ctrl) {
1215
// wait for content to load into table
1316
$scope.$watch(function () { return $elem.find("tbody").is(':visible'); },
@@ -35,7 +38,7 @@
3538

3639
$elem.find('tbody').css({
3740
'display': 'block',
38-
'height': '400px',
41+
'height': $scope.tableHeight || '400px',
3942
'overflow': 'auto'
4043
});
4144

0 commit comments

Comments
 (0)