popup error message or write console log when visibleColumns length does not match headerCells

popup error message or write console log when visibleColumns length does not match headerCells

ChuckLuChuckLu Posts: 53Questions: 8Answers: 0

Link to test case: https://github.com/ChuckTest/DataTablesTest/tree/issue-2023-1207-002
Debugger code (debug.datatables.net):
Error messages shown: no error message show, but there is error on console of browser
Description of problem:
Today when I did a test case, I got the error message, can't access property "style", headerCells[i] is undefined. In my test case, the visibleColumns count is 5, and headerCells count is 4.
It would be better if we can check headerCells count and visibleColumns count, and throw exception here when the count does not match.
https://github.com/DataTables/DataTablesSrc/commit/a0417585115ca4bb8a6675eed7738724432ad032#r134400072

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Thank you. I'll look at how I can add an error for this misconfiguration.

    Allan

Sign In or Register to comment.