问题描述
我正在使用数据表.并且默认情况下,在对一列进行排序时具有分页功能会重绘所有表格,并使您进入分页表格的第一页.有没有一种简单的方法可以告诉数据表我只想对当前分页进行排序和重绘?如果没有,我该如何覆盖默认排序功能?另外:我使用的是没有任何ajax功能的静态数据表.
I'm using datatables. And by default with pagination feature on sorting one column redraws all the table and puts you to the first page of paginated ones.Is there an easy way to tell datatables that I want to sort and redraw only current pagination? And if there isn't how do I override default sorting feature?Addition: I'm usin static data table without any ajax features.
推荐答案
我在Internet上看到了一些想法,但是对我有用的唯一方法是在函数_fnFilterComplete中注释掉重置为0
I've seen a few idea on the Internet but the only thing that worked for me was commenting out the reset to 0 in function _fnFilterComplete
/* Redraw the table */
/*oSettings._iDisplayStart = 0 Andrew nuked this 8/5/2013 ;*/
_fnCalculateEnd( oSettings );
_fnDraw( oSettings );
这篇关于数据表:仅对表的当前分页进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!