检测数据表上的页面更改 [英] Detect page change on DataTable

查看:18
本文介绍了检测数据表上的页面更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 DataTable 我可以订购、列出、进行分页,但我想检测分页何时发生变化,我已经看到了 API 但我唯一能做的就是更改页面但没有检测到此更改.

With DataTable I can order, list, do pagination but I want to detect when the pagination changes, I've seen the API but the only one I can do is change the page but no detect this change.

推荐答案

您可以使用 fnDrawCallbackfnInfoCallback 来检测变化,当 next 被点击时,它们都是被解雇了.

You may use fnDrawCallback or fnInfoCallback to detect changes, when next is clicked both of them are fired.

但请注意,页面更改并不是触发这些回调的唯一来源.

But beware, page changes are not the only source that can fire those callbacks.

这篇关于检测数据表上的页面更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆