Individual column searching (select inputs)

Individual column searching (select inputs)

kingurukinguru Posts: 7Questions: 3Answers: 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: 21,327Questions: 26Answers: 4,949

    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.