Bootstrap-table重置table排序图标
Bootstrap-table reset table sort icon
我使用 bootstrap-table 从数据库填充我的数据,但我遇到了如何重置 table 的问题,包括 "sort" 函数及其图标.到目前为止我用过:
$('#table').bootstrapTable('resetView');
$('#table').bootstrapTable('refresh');
在 http://bootstrap-table.wenzhixin.net.cn/documentation/ 上,但 none 有效。我有一个重置按钮,但它不起作用。
$('#resetBtn').on('click', function() {
});
你可以销毁table并重建它,尝试使用:
$('#resetBtn').on('click', function() {
$('#table').bootstrapTable('destroy'); //Destroy bootstrap table
$('#table').bootstrapTable(); //Rebuild bootstrap table
//You can do it in one line
//$('#table').bootstrapTable('destroy').bootstrapTable();
});
希望对您有所帮助。
我使用 bootstrap-table 从数据库填充我的数据,但我遇到了如何重置 table 的问题,包括 "sort" 函数及其图标.到目前为止我用过:
$('#table').bootstrapTable('resetView');
$('#table').bootstrapTable('refresh');
在 http://bootstrap-table.wenzhixin.net.cn/documentation/ 上,但 none 有效。我有一个重置按钮,但它不起作用。
$('#resetBtn').on('click', function() {
});
你可以销毁table并重建它,尝试使用:
$('#resetBtn').on('click', function() {
$('#table').bootstrapTable('destroy'); //Destroy bootstrap table
$('#table').bootstrapTable(); //Rebuild bootstrap table
//You can do it in one line
//$('#table').bootstrapTable('destroy').bootstrapTable();
});
希望对您有所帮助。