How to increase DataTable column filter character limit?

How to increase DataTable column filter character limit?

vcharvchar Posts: 2Questions: 1Answers: 0

Hi guys,

I was spending a whole day to find a way to keep the column filter searching regardless the number of characters being inputted. At the moment, i.e the date column stops filtering after the 12th character is entered as I have a custom search condition which requires a longer than a 12-character input.

Can anyone shed light on how to achieve that?

Regards,

Answers

  • kthorngrenkthorngren Posts: 20,275Questions: 26Answers: 4,765

    Since its something custom you wrote we will need to see it in order to help debug. There is nothing built into Datatables that limits the number of characters you can search with. Please provide a link to your page or a running test case replicating the issue so we can take a look.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • vcharvchar Posts: 2Questions: 1Answers: 0

    hi Kthorngren,

    thank for your help, here is a link which I've just created so that you can replicate the issue. When you enter upto to 2008/09/26 20, you see the value is logged to the console but any characters after than ie. '2008/09/26 201...`.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Yep, that's an optimisation in the code. As the previous search returned no matches, then nor would that search with extra characters on the end, so there's point running it.

    Colin

This discussion has been closed.