I'm loading in background task (using ajax and Python api) a possibly large table by blocks of 25 rows. I'm using a bootstrap table sorter. I would like to be able to initialise table sorter after first block loaded and then refresh it after each block.
If I simply initialise my table sorter on the first block loaded, filter and sort, it fails when a subsequent block is loaded.
Is there a way to refresh/reload table sorter as soon as rows are added?
答案 0 :(得分:0)
谢谢, 我最终使用以下语法完成了它: $(“#my-table”)。trigger(“update”,[resort,dummyCallbackFunction]);
其中resort是一个设置为True或False的布尔值,而dummyCallFunction是一个在我的情况下无效的函数。
效果很好。