Indivudual column search not working with ScrollY

Indivudual column search not working with ScrollY

YogenYogen Posts: 2Questions: 1Answers: 0

Hi,

I'm currently developping a Datatable with individual column search, all is working but when I try to add the scrollY parameter to my DataTable my column search stop working.

Here u can see my DataTable : http://live.datatables.net/loxeyope/1/edit?html,js,output

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin
    Answer ✓

    Yes - when you enable scrolling DataTables has to split the table into two (or three if you have a footer like here) individual tables. That allows the middle table, which visually shows the body, to scroll without scrolling the header and footer.

    So to get the thead and tfoot elements you need to use the table().header() and table().footer() methods, respectively.

    E.g.

    $('#table tfoot .text-input')
    

    becomes

    $('.text-input', table.table().footer())
    // or
    $(table.table().footer()).find('.text-input')
    

    Updated example: http://live.datatables.net/loxeyope/5/edit .

    Allan

  • YogenYogen Posts: 2Questions: 1Answers: 0

    Thanks a lot for this quick answer Allan !

This discussion has been closed.