Encountered Uncaught TypeError: a.match is not a function when trying to implement horizontal scroll

Encountered Uncaught TypeError: a.match is not a function when trying to implement horizontal scroll

shchyeshchye Posts: 1Questions: 1Answers: 0

Hi guys,

I have been trying to implement horizontal scroll for my datatable, but i keep getting this error - Uncaught TypeError: a.match is not a function.

Background information:
- DataTable is based off a dataframe sent over from flask function using to_html()
- import Javascript & CSS library files via URLs instead of local files0- All functions of datatable are working perfectly until i tried to implement horizontal scroll --> "scrollX: true"

Segment with error:
function v(a) {
return null === a ? "0px" : "number" == typeof a ? 0 > a ? "0px" : a + "px" : a.match(/\d$/) ? a + "px" : a
}

How i initialized my datatable:
$('#table_name').DataTable({
"deferRender": true,
"aaSorting": [],
"scrollX": true
});

Please help a noob out! Thank you so much!

Answers

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

    Hi @shchye ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.