Cannot read property '_ColReorder_iOrigCol' of undefined

Cannot read property '_ColReorder_iOrigCol' of undefined

stormfengstormfeng Posts: 2Questions: 1Answers: 0

Today is 2018/3/28.
Unfortunatelymet this bug happend again with the thymeleaf(which is strongly recomended by springboot)。
Thymeleaf has a strict rule about html which makes it can't parse the syntax like order: [[0,'desc'],[1,'asc']]。
So,I spilt the order option in more parts like below:
var myOrder = [];
myOrder[0] = [0,"desc"];
myOrder[1] = [1,"desc"];
$("#example").DataTable({
colReorder: true,
order: order,
initComplete: function () {
console.log("table complete!")
}
});

Finally, I made it and it works well.
Damn thymeleaf !
Just Hope you gus pay attention to this non-bug bug.

Answers

  • stormfengstormfeng Posts: 2Questions: 1Answers: 0

    I spilt the order option in more parts like below:
    var myOrder = [];
    myOrder[0] = [0,"desc"];
    myOrder[1] = [1,"desc"];
    Finally, I made it and it works well.
    Just Hope you gus pay attention to this non-bug bug.

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Are you able to give me a link to the page showing the issue? I'm not entirely clear on where you are using the [[0,'desc'], [1,'asc']? That isn't valid JSON - is that why thymeleaf is rejecting it perhaps? Is there documentation for what thymeleaf does support wherever you are using that?

    Allan

This discussion has been closed.