Skip to content

Commit acd17b2

Browse files
committed
Added dynamic table height calculation
1 parent 3ebe0f5 commit acd17b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/assets/js/signal_sets.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,18 @@ bulkSelectDivs.forEach(div => {
150150

151151
var tableHeight = window.screen.width / 3.4;
152152

153+
function vh(percent) {
154+
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
155+
return (percent * h) / 100;
156+
}
157+
153158

154159
var table = new DataTable('#signalSetsTable', {
155160
fixedHeader: true,
156161
paging: false,
157162
scrollCollapse: true,
158163
scrollX: true,
159-
scrollY: tableHeight,
164+
scrollY: vh(60),
160165
fixedColumns: {
161166
left: 2
162167
},

0 commit comments

Comments
 (0)