fnSaveState being called multiple times with ColReorder plugin

fnSaveState being called multiple times with ColReorder plugin

mkonecnymkonecny Posts: 1Questions: 0Answers: 0
edited February 2013 in General
Hello, I'm having a problem where I'm using the ColReorder function and my fnSaveState callback is being called twice.

I've used the Chrome debugging tool to view the stack trace, but I haven't gotten very far.

If you look at the stack trace, you see that after line 4851, the code diverges. One on code path is goes to builder.js:420 which is in my fnSaveState callback,
on the other code path, it first goes to ColReorder.js which eventually calls my fnSaveState callback again.

Line 4851 in datatables 1.9.4 is a for loop which iterates over the callback's defined. Any idea why this is happening? I tried the official ColReorder plugin demo, and could not recreate this behaviour there.

I should also note that on line 4851, the value of sState is "aoStateSaveParams"

[code]
console.trace() jquery-1.7.2.js:8244
send jquery-1.7.2.js:8244
jQuery.extend.ajax jquery-1.7.2.js:7719
fnStateSave builder.js:420
_fnSaveState jquery.dataTables.js:4411
ColReorder._fnOrderColumns dataTables.ColReorder.js:557
s.dt.aoDrawCallback.push.fn dataTables.ColReorder.js:506
_fnCallbackFire jquery.dataTables.js:4851
_fnDraw jquery.dataTables.js:1566
_fnAjaxUpdateDraw jquery.dataTables.js:2059
(anonymous function) jquery.dataTables.js:1899
$.ajax.success builder.js:363
fire jquery-1.7.2.js:1075
self.fireWith jquery-1.7.2.js:1193
done jquery-1.7.2.js:7538
callback jquery-1.7.2.js:8333
[/code]

[code]
console.trace() jquery-1.7.2.js:8244
send jquery-1.7.2.js:8244
jQuery.extend.ajax jquery-1.7.2.js:7719
fnStateSave builder.js:420
_fnSaveState jquery.dataTables.js:4411
_fnCallbackFire jquery.dataTables.js:4851
_fnDraw jquery.dataTables.js:1566
_fnAjaxUpdateDraw jquery.dataTables.js:2059
(anonymous function) jquery.dataTables.js:1899
$.ajax.success builder.js:363
fire jquery-1.7.2.js:1075
self.fireWith jquery-1.7.2.js:1193
done jquery-1.7.2.js:7538
callback jquery-1.7.2.js:8333
[/code]
This discussion has been closed.