Individual column searching (select inputs)

Individual column searching (select inputs)

kingurukinguru Posts: 5Questions: 2Answers: 0

What if "d" is html?
For example "<a href='#'>My text</a>"

in this sample https://www.datatables.net/release-datatables/examples/api/multi_filter_select.html
column.data().unique().sort().each( function ( d, j ) {
select.append( '<option value="'+d+'">'+d+'</option>' )
} );

Answers

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736

    d is column data. Use console.log(d) in the loop to see what it is, like this:

                    column.data().unique().sort().each( function ( d, j ) {
                        console.log( d );
                        select.append( '<option value="'+d+'">'+d+'</option>' )
                    } );
    

    Kevin

Sign In or Register to comment.