Datatables v1.10 - How to retrieve caseInsensitive value?

Datatables v1.10 - How to retrieve caseInsensitive value?

zeinerrjzeinerrj Posts: 11Questions: 1Answers: 2

Hi,

I have set up a datatable as

$("#example").DataTable( { "search": { "caseInsensitive": false } } )

I am trying to get/set the caseInsensitive value. I have tried $("#example").DataTable().caseInsensitive and $("#example").DataTable().search().caseInsensitive but nether works. Does anyone know the correct syntax?

Thanks.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Answer ✓

    Hi,

    There is unfortunately no public API to get this information from a DataTable. You could use the information from the settings() object (table.settings()[0].oSearch. bCaseInsensitive I think) - but this is not a public API - it might change in future! What I would suggest, if you do use this option is that you create a plug-in API method that will return this information, so if it does change in future, you will only need to change it in one place.

    Allan

  • zeinerrjzeinerrj Posts: 11Questions: 1Answers: 2

    Hi Allan,

    Thank you for the answer, and thank you for your work on Datatables!

This discussion has been closed.