select input searching for one column

select input searching for one column

buroticaburotica Posts: 7Questions: 3Answers: 0

Hello
I saw the example "Individual column searching (select input)", I would like to do the same thing, but only on a column (column 2). Do you have an example or a piece of code?
Best regard

Replies

  • kthorngrenkthorngren Posts: 21,448Questions: 26Answers: 4,974

    Instead of the this.api().columns().every( function () { loop you could just set the variable column to the specific column you want, something like this on line 5:

    var column = this.api().column(2);
    

    Make sure to remove the every() loop (lines 4 and 21) in the example:
    https://datatables.net/examples/api/multi_filter_select.html

    Kevin

This discussion has been closed.