How to run a function after table page changed?
How to run a function after table page changed?
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
drawevent ordrawCallbackoption is the way to do this.The issues with
pageis that it is triggered before the page change has actually be redrawn! You could listen fordrawinside apagelistener, but its probably as well to just listen fordraw.Allan