如何在数据表插件中设置默认行数?
How to set the default amount of rows in datatables plugin?
有人知道 Yet Another DataTables Column Filter (yadcf) js 插件吗?
它没有太多文档,我不知道如何设置要显示的默认行数(它默认显示 10 行,我想要至少 50 行)。
快速回答:"pageLength": 50
(对于 1.10+)或 "iDisplayLength": 50
(对于 1.9-)
长一:
你需要区分datatables plugin and yadcf插件
yadcf 的唯一目的是让用户能够轻松地向数据添加各种类型的过滤器tables table
This jQuery plug-in allows the user to easily add filter components to table columns, the plug-in works on top of the DataTables jQuery plug-in.
所以你现在的问题与yadcf插件无关,
但是如果您查看 yadcf 展示柜,您会发现它在其页面上演示了 iDisplayLength
属性的使用(这是您需要的案例)
查看 Yet Another DataTables Column Filter - DOM source example 页面,滚动直到看到该页面上使用的代码片段,注意:"iDisplayLength": 25
p.s 我是 yadcf
的作者
有人知道 Yet Another DataTables Column Filter (yadcf) js 插件吗? 它没有太多文档,我不知道如何设置要显示的默认行数(它默认显示 10 行,我想要至少 50 行)。
快速回答:"pageLength": 50
(对于 1.10+)或 "iDisplayLength": 50
(对于 1.9-)
长一:
你需要区分datatables plugin and yadcf插件
yadcf 的唯一目的是让用户能够轻松地向数据添加各种类型的过滤器tables table
This jQuery plug-in allows the user to easily add filter components to table columns, the plug-in works on top of the DataTables jQuery plug-in.
所以你现在的问题与yadcf插件无关,
但是如果您查看 yadcf 展示柜,您会发现它在其页面上演示了 iDisplayLength
属性的使用(这是您需要的案例)
查看 Yet Another DataTables Column Filter - DOM source example 页面,滚动直到看到该页面上使用的代码片段,注意:"iDisplayLength": 25
p.s 我是 yadcf
的作者