Datatable search max length

Datatable search max length

airwindairwind Posts: 1Questions: 1Answers: 0

Hi,

i have found this solution $('.dataTables_filter input').attr('maxlength', 30); that will limit the search input to 30 character. Question here is how do i apply it globally for the 100+ datatables in the project without having to go through 1 by 1. Thanks.

Answers

  • colincolin Posts: 15,209Questions: 1Answers: 2,592

    Hi @airwind ,

    That would work for all tables on the page - see example here.

    Cheers,

    Colin

This discussion has been closed.