How to add a additional Searchfield

How to add a additional Searchfield

BetaOpBetaOp Posts: 1Questions: 1Answers: 0
edited October 2019 in Free community support

I tried to add a Searchfield but it does not work properly

     $(document).ready( function () {
                var table =$('#dataTable').DataTable({
                    responsive: true,
                    "columns": 
    //XYZ
                        ]
                });

    $('#column3_search').on( 'keyup', function () {
                  table
                        .columns( 3 )
                        .search( this.value )
                        .draw();
                } );
            } );

or

    function filterColumn ( i ) {
                $('#dataTable').DataTable().column( i ).search(
                    $('#col'+i+'_filter').val(),
                    $('#col'+i+'_regex').prop('checked'),
                    $('#col'+i+'_smart').prop('checked')
                ).draw();
            }

            $(document).ready( function () {
                var table =$('#dataTable').DataTable({
                    responsive: true,
                    "columns": [
    //XYZ
                        ]
                });

                $('input.column_filter').on( 'keyup click', function () {
                    filterColumn( $(this).parents('tr').attr('data-column') );
                } );
            } );

i tired to make it like this

Answers

This discussion has been closed.