Uncaught TypeError: Cannot read property 'style' of undefined (v1.10.12)
Uncaught TypeError: Cannot read property 'style' of undefined (v1.10.12)
![Kuro](https://secure.gravatar.com/avatar/c7fa1fed73bda594253b9507eb7e8401/?default=https%3A%2F%2Fvanillicon.com%2Fc7fa1fed73bda594253b9507eb7e8401_200.png&rating=g&size=120)
Looking around it seems like this error occurs when the HTML column count and the column definition for DataTables do not match. I recently updated from 1.10.0 to 1.10.12 to move from Table Tools to Buttons to enhance some export functionality and this problem started cropping up.
Spent a couple of days looking for a solution, but can't seem to get this resolved.
Here's a (minimal) fiddle with the error included:
https://jsfiddle.net/5a2oz62y/2/
Unless I'm missing something, I've got 5 columns in both sides of the table definition, but the error persists despite it looking like the style is being applied. In the actual application the error is blocking follow-on functionality. Can't help but feel like I'm overlooking something obvious.
Thanks in advance.
This question has an accepted answers - jump to answer
Answers
Remove dom option since it's not defining anything, then the table displays properly.
I had been using the empty dom parameter to remove the additional formatting DataTables provides, but I guess this version doesn't care for it.
Marked as answer. Thanks kindly.
The absolute minimum for the
dom
property is for it to be't'
(i.e. the table).Allan