Add bootstrap-table.js library to support dynamic table functionality in the project
This commit is contained in:
15
js/tableResize.js
Normal file
15
js/tableResize.js
Normal file
@@ -0,0 +1,15 @@
|
||||
let table = $('#t1');
|
||||
|
||||
$(function () {
|
||||
let options = table.bootstrapTable('getOptions');
|
||||
options.height = document.getElementById('content').clientHeight - 170;
|
||||
table.bootstrapTable('refreshOptions', options);
|
||||
});
|
||||
|
||||
function tableresize() {
|
||||
let options = table.bootstrapTable('getOptions');
|
||||
options.height = document.getElementById('content').clientHeight - 170;
|
||||
table.bootstrapTable('refreshOptions', options);
|
||||
}
|
||||
|
||||
window.addEventListener("resize", tableresize);
|
||||
Reference in New Issue
Block a user