• Resolved Tim Thee

    (@timotheebesse)


    Hi,

    When I updated to 0.9.11 the default options broke

    Here was my setup, working fine untill today:

    {"dom":"rtip","order":[[0"desc"]],"scrollX": true}
    
    I saw after the update that the default options text was modified (linebreaks had been inserted) and I managed to restore some options by adding quotes :

    {
    “dom”: “rtip”,
    “scrollX”: “true”
    }`
    But I can’t get the new syntax for the ordering of the first column : “order”: “[[0, ‘desc’]]” doesn’t work

    Thanks for your help !

    https://www.ads-software.com/plugins/inline-google-spreadsheet-viewer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Meitar

    (@meitar)

    "order": "[[0, 'desc']]"

    That’s two strings. You need an array. I think you mean

    "order": [[0, "desc"]]

    Thread Starter Tim Thee

    (@timotheebesse)

    It doesn’t seem to work,

    when I write this :

    {
        "dom": "rtip",
        "scrollX": "true",
        "order": [[0, "desc"]]
    }

    The code is automatically replaced with :

    {
        "dom": "rtip",
        "scrollX": "true",
        "order": [
            [
                0,
                "desc"
            ]
        ]
    }

    And the display of tables is broken (no datatables, no scrolling, etc)

    When I write on one line :
    {"dom": "rtip", "scrollX": "true", order": [[0, "desc"]]}

    The frame becomes blank when I save

    Any idea of what’s provoking this ?

    Thanks

    Plugin Author Meitar

    (@meitar)

    "scrollX": "true"

    This is the string “true”, but the scrollX option takes a boolean value. I think you want:

    "scrollX": true

    Also,

    {"dom": "rtip", "scrollX": "true", order": [[0, "desc"]]}

    is syntactically broken; you’re missing a double-quote in front of order.

    Any idea of what’s provoking this ?

    I think it would help you to refresh your knowledge of JSON syntax and the various DataTables options you’re trying to use.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Default options broken’ is closed to new replies.