Ajax request twice
Ajax request twice
hendrikwjy
Posts: 8Questions: 1Answers: 0
in Responsive
Hi,
when i set responsive: true, ajax request call twice when the page load for the first time.
But when i set it to false, it call once.
how to resolve it?
Thanks
This discussion has been closed.
Replies
Its a bug in the 2.2.0 version of Responsive I'm afraid. Using the nightly version will resolve it until the next release. I'll tag it soon as this is coming up quite frequently.
Allan
@allan How can I install nightly version via NPM? I tried
github:DataTables/Dist-DataTables-Responsive-Bootstrap
but this issue is still not fixed.You'll also need
https://github.com/DataTables/Dist-DataTables-Responsive
since that is where the fix was. The Bootstrap styling one depends upondatatables.net-responsive
, so it it currently probably pulling in 2.2.0 release.This is the fix in that dist repo.
Allan
Hi Allan,
I had the same problem, I mean Ajax request was called twice. Also, for the second call, the displayStart value was lost (it always passed 0 even if for the first round displayStart was not equals to 0). Using the nightly version the problem does not raise anymore. Good. Do you know when this nightly version will be released? Many thanks. Antonio
Responsive 2.2.1 is already available.
Allan
Hi Allan, thank you very much for your effort.
Could it be, that you by accident forgotten to tag it for bower? It seems via bower is only 2.2.0 available.
Its tagged here, and I think bower just used the semver tags. What bower package are you installing?
Allan
I have this in my bower.json:
But when I use 2.2.1, Visual Studio (which seems to use standard bower I think) complains:
But maybe this has to do something with some registry. I am relative new to bower.
Nope - that's not you. Its something wrong with the deploy repo.
I'll look into it and post back when i understand what has gone wrong.
Allan
Hi allan,
I have the same issue
but i am not loading datatable responsive js
just using datable.min.js
i am new to it and dint got the solution you reffered
can you please explain thanks
The problem in this thread was due to a bug in the Responsive plugin. If you aren't using responsive then upgrading to the latest responsive won't help. It would be best for you to start a new thread, describe the problem and provide a link to your page or a test case replicating the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin