ColReorder reorderCallback should have "settings" parameter
ColReorder reorderCallback should have "settings" parameter
hubo
Posts: 45Questions: 14Answers: 0
I think that reorderCallback should have "settings" parameter like initComplete and other events.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
The function is executed in the scope of the instance, so
this.s
will get you the settings object. However, I would strongly point out that this is an internal property. It can, will and does change between versions. It is not indented to be a public API.Allan
Yes, I find out that I can use "this.s.dt", but as you say, it can change in the future. So it will be great if you add "this.s.dt" as the first argument of the function like other events has.
Changing the arguments would break backwards compatibility. But I will look into a better fix that is consistent across all extensions.
Allan
I do not know, if I am expressed good myself.
Now the ColReorder has reorderCallback:
reorderCallback : function () { /* Some code. */ }
And I think it will be fine if it can be:
reorderCallback: function (e) { /* Some code, but e will now represents this.s.dt. (Right now it is undefined.) */ }
Yes, that would work - sorry, I had forgotten that there were no parameters for the function.
However, I would rather make a consistent API for all extensions. I will look into this for a future release.
Allan