Ajax request twice

Ajax request twice

hendrikwjyhendrikwjy Posts: 8Questions: 1Answers: 0

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

Replies

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    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

  • elfsundaeelfsundae Posts: 1Questions: 0Answers: 0

    @allan How can I install nightly version via NPM? I tried github:DataTables/Dist-DataTables-Responsive-Bootstrap but this issue is still not fixed.

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    You'll also need https://github.com/DataTables/Dist-DataTables-Responsive since that is where the fix was. The Bootstrap styling one depends upon datatables.net-responsive, so it it currently probably pulling in 2.2.0 release.

    This is the fix in that dist repo.

    Allan

  • garaggarag Posts: 1Questions: 0Answers: 0

    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

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
  • CGollhardtCGollhardt Posts: 2Questions: 0Answers: 0

    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.

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Its tagged here, and I think bower just used the semver tags. What bower package are you installing?

    Allan

  • CGollhardtCGollhardt Posts: 2Questions: 0Answers: 0

    I have this in my bower.json:

    "datatables.net-responsive-bs": "2.2.0"
    

    But when I use 2.2.1, Visual Studio (which seems to use standard bower I think) complains:

    bower datatables.net-responsive-bs#2.2.1
    ENORESTARGET No tag found that was able to satisfy 2.2.1
    

    But maybe this has to do something with some registry. I am relative new to bower.

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    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

  • sfmittalsfmittal Posts: 1Questions: 0Answers: 0

    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

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794

    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

This discussion has been closed.