Possible bug in _fnCalculateColumnWidths (datatables line 3730)

Possible bug in _fnCalculateColumnWidths (datatables line 3730)

alandmoorealandmoore Posts: 4Questions: 0Answers: 0
edited August 2012 in General
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.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Are you using jQuery UI and jQuery 1.8? If so, are you using the very latest jQuery UI release? If not, can you link me to a page with this problem please?

    Thanks,
    Allan
  • alandmoorealandmoore Posts: 4Questions: 0Answers: 0
    Using jquery 1.8.0 with Jquery-ui 1.8.18
This discussion has been closed.