layout: docs title: FAQ description: Frequently Asked Questions. group: faq redirect_from:
When you set the height
of the bootstrap table, the fixed header
feature is automatically enabled, that is what causes the problem, you need to listen to the resize
event of the window and use the resetView
method to solve this problem, code example:
$(function () {
$('#tableId').bootstrapTable() // init via javascript
$(window).resize(function () {
$('#tableId').bootstrapTable('resetView')
})
})
For merged cells, when you do refresh, next page or switch columns to show, the merge cells will be unmerged. We can listen the events(on load success, on column switch, on page change and on search) to solve this problem, code example:
$table.on('load-success.bs.table column-switch.bs.table page-change.bs.table search.bs.table', function () {
$table.bootstrapTable('mergeCells', {...})
})
When you use like this:
$('#eventsTable').on('click-row.bs.table', function (event, row, $element) {
})
the first parameter is always event
: http://jsfiddle.net/wenyi/e3nk137y/11688/
and use onClickRow event:
onClickRow: function (row, $element) {
}
All your ideas and feedback are very appreciated! Please feel free to open issues on GitHub or send me an email.
I'm also grateful for your donations: Donate.