Possible bug in _fnCalculateColumnWidths (datatables line 3730)
Possible bug in _fnCalculateColumnWidths (datatables line 3730)

I was trying to make a column invisible using fnSetColumnVisibility(column, false). It works, but I get an error on the console (which causes subsequent js to not run, of course):
Uncaught TypeError: Object [object Object] has no method 'charCodeAt'
Looking through the stack, I found on datatables.js line 3730 (inside the function _fnCalculateColumnWIdths()):
cssWidth : _fnStringToCss( $(nCalcTmp).outerWidth() );
However, the outerWidth() method requires a boolean argument. If called without one, it just returns the jquery object for some reason. It seems the intention here is to get back an integer, so I put "false" in as an argument. This made the error go away.
I don't know if "true" would be more appropriate here, but either one seems to work fine as far as I can tell.
Uncaught TypeError: Object [object Object] has no method 'charCodeAt'
Looking through the stack, I found on datatables.js line 3730 (inside the function _fnCalculateColumnWIdths()):
cssWidth : _fnStringToCss( $(nCalcTmp).outerWidth() );
However, the outerWidth() method requires a boolean argument. If called without one, it just returns the jquery object for some reason. It seems the intention here is to get back an integer, so I put "false" in as an argument. This made the error go away.
I don't know if "true" would be more appropriate here, but either one seems to work fine as far as I can tell.
This discussion has been closed.
Replies
Thanks,
Allan