Datatable 1.9.4 ColReorder : "Cannot call method 'proxy' of undefined"
Datatable 1.9.4 ColReorder : "Cannot call method 'proxy' of undefined"
niki4810
Posts: 7Questions: 0Answers: 0
Hi,
After updating to datatables 1.9.4, I notice that the ColReorder plugin is throwing the following exception
Issue:
Source: http://10.16.18.34:9091/platform/libs/js/datatables/ColReorder.js
Line # 407
Error: Uncaught TypeError: Cannot call method 'proxy' of undefined
Fix:
To fix the above issue I just add to change jQuery.proxy to $.proxy on line #407 in the ColReorder plugin
Before fix:
oDTSettings.oApi._fnCallbackReg(oDTSettings, 'aoDestroyCallback', jQuery.proxy(this._fnDestroy, this), 'ColReorder');
After the fix :
oDTSettings.oApi._fnCallbackReg(oDTSettings, 'aoDestroyCallback', $.proxy(this._fnDestroy, this), 'ColReorder');
Upon making the above change I fixed the issue with colReorder. Just wanted to let the community know about this.
Thanks,
Nikhil
After updating to datatables 1.9.4, I notice that the ColReorder plugin is throwing the following exception
Issue:
Source: http://10.16.18.34:9091/platform/libs/js/datatables/ColReorder.js
Line # 407
Error: Uncaught TypeError: Cannot call method 'proxy' of undefined
Fix:
To fix the above issue I just add to change jQuery.proxy to $.proxy on line #407 in the ColReorder plugin
Before fix:
oDTSettings.oApi._fnCallbackReg(oDTSettings, 'aoDestroyCallback', jQuery.proxy(this._fnDestroy, this), 'ColReorder');
After the fix :
oDTSettings.oApi._fnCallbackReg(oDTSettings, 'aoDestroyCallback', $.proxy(this._fnDestroy, this), 'ColReorder');
Upon making the above change I fixed the issue with colReorder. Just wanted to let the community know about this.
Thanks,
Nikhil
This discussion has been closed.
Replies
if ( jQuery.browser.msie && JQuery.browser.version == "6.0" )
The fix is to use '$' instead of jQuery as shown below
if ( $.browser.msie && $.browser.version == "6.0" )
NOTE: While this might not be an issue while loading the libraries externally, but if your project has a RequireJS AMD setup then you would see this issue.
Is there a way I can submit a pull request for these fixes ?
Thanks,
Nikhil
https://github.com/DataTables/ColVis :-)
Allan
I submitted two pull requests one for ColVis plugina and the other for ColReorder plugins, here are associated links :
ColReorder :
https://github.com/DataTables/ColReorder/pull/6
ColVis:
https://github.com/DataTables/ColVis/pull/11
Thanks,
Nikhil
Allan