How to implement sequential filters in Individual column searching (select inputs)

How to implement sequential filters in Individual column searching (select inputs)

naytonnayton Posts: 16Questions: 6Answers: 0

When selecting a filter in the <SELECT> the other <SELECT> are presenting all the data in the column, as if there was no filter applied. Therefore, it would be very useful if applying a filter on one of the <SELECT> the others would only show the data after selecting each one of the <SELECT>.

could someone help me with this JS code? @stporstein , @ecedenyo

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    Answer ✓

    I believe this example does what you are looking for.

    Allan

  • naytonnayton Posts: 16Questions: 6Answers: 0

    @allan
    Thank you very much, Exactly what I was looking for.

    I would like to put filters in the header. I read in the comments that @hasaneker said that just replace

    .appendTo( $(column.footer().empty()) )
    per
    .appendTo( $(column.header()) )

    however this generates a disarrangement. Could you help me with this implementation. Thank you very much in advance.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    This is the example updated with the select elements in the header: http://live.datatables.net/gejojiqu/1251/edit

    Colin

Sign In or Register to comment.