Making vue datatable ajax parameters match the javascript ones

Making vue datatable ajax parameters match the javascript ones

mshahmshah Posts: 19Questions: 5Answers: 1

Link to test case:
Debugger code (
Error messages shown:
Description of problem:
Hello all,

When using Vue, it looks like the ajax parameters are different then the javascript ones. Is there a way for the Vue component to send the same parameters as the javascript one?

Vue parameters:

JS parameters:


  • allanallan Posts: 59,793Questions: 1Answers: 9,680 Site admin

    sEcho and friends are the legacy parameters for server-side processing. How are you initialising the DataTable component in view?

    If you could create a minimal example using StackBlitz or similar, that would greatly aid debugging.


  • mshahmshah Posts: 19Questions: 5Answers: 1
    edited May 24

    Thanks Allan. I'm using this example:

    Here's the example:

    Can you let me know what the non-legacy version is?

    Also if it helps, this is what's in my package.json:
    "": "^1.13.4",
    "": "^1.13.4",
    "": "^1.13.4",
    "": "^2.0.3",
    "": "^1.6.2",
    "": "^1.6.2",
    "": "^2.1.0",

  • allanallan Posts: 59,793Questions: 1Answers: 9,680 Site admin

    Ah - you are triggering legacy mode by using the sAjaxSource parameter. If you have a look at our reference of options you won't find it there. It is only referenced on our legacy site.

    Update your initialisation to be:

        ajax: '/subscriptions/list',
        lengthChange: false,
        select: true,
        serverSide: true,

    and that will send in the "modern" (for about that last 10 years :)) format. There is also a note on that manual page about the legacy mode if you are interested.

    Note that I've removed the options from the object which were already at their default value - e.g. ordering is enabled by default.


  • mshahmshah Posts: 19Questions: 5Answers: 1

    Thanks Allan. That worked.

Sign In or Register to comment.