fixedHeader.enabled() throwing "Cannot read property '0' of undefined".

fixedHeader.enabled() throwing "Cannot read property '0' of undefined".

twistedwhispertwistedwhisper Posts: 3Questions: 3Answers: 0

This is in reference to the API fixedHeader.enabled() at https://datatables.net/reference/api/fixedHeader.enabled()

How to reproduce

In order to reproduce it, use an existing example at https://datatables.net/extensions/fixedheader/examples/options/simple.html

Bring up the console (development tools) and run the following code:

$.fn.dataTable.tables({ api: true }).fixedHeader.enabled()

Suggestion

Open the source file dataTables.fixedHeader.js

In line 694 above, there's a typo with the highlighter word content. It should be context instead.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Good spot - it's actually been fixed already (see here) but just waiting to be released. You can find the nightly releases here which you can use until the release is made (I'll also update this thread when it is).

    Colin

This discussion has been closed.