Does anyone have any experience with older versions of jQuery Datatables?

Does anyone have any experience with older versions of jQuery Datatables?

HenltonGomesHenltonGomes Posts: 2Questions: 1Answers: 0

I've been trying to figure out how to implement a filter button for a table. It uses Datatables 1.9x and is receiving the data from a Rails API. I've had a hell of a time looking through the legacy docs to find the best practices for this sort of thing, but I haven't gotten as far as figuring out where to put the filter function. If anyone could point me in the right direction, I would really appreciate it.

Answers

  • allanallan Posts: 63,195Questions: 1Answers: 10,412 Site admin

    It depends a little on exactly what you want to do - if you want to just replicate the built in global search input then:

    var table = $('#myTable').dataTable();
    
    $('#mySearchInput').on('keyup', function () {
      table.fnFilter( this.value );
    });
    

    Would be all that is needed. fnFilter is the documentation for that.

    Allan

  • HenltonGomesHenltonGomes Posts: 2Questions: 1Answers: 0
    edited November 2019

    [Removed - spam]

    issue got solved!!

This discussion has been closed.