How to run a function after table page changed?
How to run a function after table page changed?
abolfazl
Posts: 1Questions: 1Answers: 0
Hi
I want to filter data by a specific value in a column. I could filter data but when I change the page, the filter doesn't apply to new page data.
I found_** page.dt **_event and put my codes on it, but nothing happened.
I want to run my codes after page change. How I can do that?
thanks
This discussion has been closed.
Answers
Have you tried using drawcallback ? https://datatables.net/reference/option/drawCallback
Shay
Yes, the
draw
event ordrawCallback
option is the way to do this.The issues with
page
is that it is triggered before the page change has actually be redrawn! You could listen fordraw
inside apage
listener, but its probably as well to just listen fordraw
.Allan