I'm having trouble with several features I want to implement:
- I want a fixed table header so I can scroll down while still be able to see the header as I go through the data.
- I want my table to be as large as it can be => no overflow-x
- My columns can be from different sizes, yet the header must be aligned.
- My < td > have to restrain from a max-height, and add a scrollbar inside the td.
Are these even possible ? Because I tried several inconclusives solutions =(
If I separate the header from the table, it'll mess up the width of the columns header.
.test {
overflow-x: visible;
overflow-y: auto;
}
If you are using visible for either overflow-x or overflow-y and something other than visible for the other. The visible value is interpreted as auto.
And these won't work:
EDIT @Merijn DK:
<!-- html -->
<table class="table table-striped table-bordered">
<thead>
<tr>
<th ng-repeat="column in columns" ng-show="column.show" ng-style="column.style">
{{ column.label }}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in results">
<td ng-repeat="column in columns" ng-show="column.show" ng-style="column.style" ng-bind-html="item.data | unsafe">
</td>
</tr>
</tbody>
</table>
//Javascript
.filter('unsafe', function($sce, $rootScope) {
return function(html) {
return $sce.trustAsHtml(html);
};
});