DataTable Editor + paging always return to page 1 when button is pressed from other pages
DataTable Editor + paging always return to page 1 when button is pressed from other pages
fmeyer@nearbysoftware.com
Posts: 18Questions: 5Answers: 0
in Editor
Hello Allan,
I have a weird issue with paging.
When I click on a button (either on the delete one, the edit or the cancel), the table loses the current page it was on and reverts to page 1. The user has to go back to the page index he was on to see the form.
See video attach starting at 00:28 : https://www30.zippyshare.com/v/AvUZqyxw/file.html
Any clue?
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @fmeyer@nearbysoftware.com ,
The video isn't loading I'm afraid, getting a 403. Could you link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Damn. The video is loading correctly from here. Could you retry?
Can I send it through other means?
It was very well explaining the issue.
Still getting the 403. Try in a browser's 'private' mode. If no joy, yep, try sending by mail (colin@datatables.net), or share it with Dropbox or Google Photos/Drive perhaps.
This is weird. It works for me even in private mode.
I've just sent you the video to your email.
Thank you.
Hi @fmeyer@nearbysoftware.com ,
Thanks for that, I watched it and can see the problem, but there's a lot going on there - child rows, editing where the form is within the table, all of which could be causing a problem.
Would you be able to link to your page (you can mail privately to avoid the forum)? Or if not, could you tweak this example here so that it's similar to your environment.
Cheers,
Colin
Well, that's not going to be easy and I won't have the time just now...
Will I be able to add Editor in to your example?
Not sure I will as it is not free...
Yes, Editor is available in the libraries drop down list. Although it will only work with client-side table updating.
Allan
Thanks Allan, I'll try then.
Have you been, by any chance, able to see the attached video?
Might ring a bell on your side, who knows...
The example I sent earlier has Editor setup - so that should give you a good starting point. He hasn't seen the video, I'll forward it on.
C
Looks like
draw()
is being called somewhere and that's resetting the paging. Without being able to see the code, I can't say for sure though.Assuming you are using
draw()
then pass infalse
as the first and only parameter to the method.Allan
Bingo!
That was it.
There were 2 calls to
draw()
, on needed that false boolean to stay on the current page.Brillant. And awesome support, as always.
Thanks guys.