Added div element to force horz scroll in table body (#2111)

Fixes #2103
- Added div that is set to the calculated table width. When
filtering is such that no rows are present in the tbody
of the table, this element will still force a horizontal
scroll in that area, allowing the user to horz scroll the headers;
This commit is contained in:
Charles Hacskaylo 2018-07-16 15:25:02 -07:00 committed by Pete Richards
parent 8c9fe2d36b
commit d7eb4c17ca
2 changed files with 11 additions and 0 deletions

View File

@ -65,3 +65,10 @@ mct-table {
margin-bottom: 3px;
}
}
.mct-table-scroll-forcer {
// Force horz scroll when needed; width set via JS
font-size: 0;
height: 1px; // Height 0 won't force scroll properly
position: relative;
}

View File

@ -59,6 +59,10 @@
</tbody>
</table>
<div class="l-tabular-body t-scrolling vscroll--persist" mct-resize="resize()" mct-scroll-x="scroll.x">
<div class="mct-table-scroll-forcer"
ng-style="{
width: totalWidth
}"></div>
<table class="mct-table"
ng-style="{
height: totalHeight + 'px',