Datatables search not working with columns

Viewed 32

I have a datatables which contains 4 columns. In these columns will display image filename with image preview. I used to search by filename. it's working it but there is a problem with search filter which is not working correctly the scenario, single row with contains 4 columns only. i want to search by particular file name. i tried it but not working it. can you please help on this

<table id="gallery" class="table table-striped table-bordered" style="width: 100%;">
    <thead>
        <tr>
            <th>Image 1</th>
            <th>Image 2</th>
            <th>Image 3</th>
            <th>Image 4</th>
        </tr>
    </thead>
    <tbody >
             <th><input type="radio" id="pickimg0" value="FileName.png"><img style="height: 80px;" class="item lazy" src="FileName.png">FileName.png</th>
            <th><input type="radio" id="pickimg1" value="Image.png"><img style="height: 80px;" class="item lazy" src="Image.png">Image.png</th>
            <th><input type="radio" id="pickimg2" value="Color.png"><img style="height: 80px;" class="item lazy" src="Color.png">Color.png</th>
            <th><input type="radio" id="pickimg3" value="Red.png"><img style="height: 80px;" class="item lazy" src="Red.png">Red.png</th>
    </tbody>
</table>


$('#gallery').DataTable({
    "responsive": true,
    "autoWidth": false,
    searching: true,
    //'bFilter':false,
   // "bSearchable":false,
   // filter: false,
    deferRender: true,
    paging: true,
    cache: true,
    pageLength: 50,
    pagingType: "simple_numbers",
    lengthMenu: [ 10, 25, 50, 75, 100, 150,200,250],
    "order": [],
    select: {
        style: "multi"
    },
    "dom": '<"top"f>rt<"bottom"lp><"clear">', // Positions table elements
    language: {
        paginate: {
            previous: "<i class='fas fa-angle-left'>",
            next: "<i class='fas fa-angle-right'>"
        }
    },
    "drawCallback": function(settings) {
    }
});

enter image description here

if i want to search by varientv1664925416712.png, Datatable is not working

0 Answers
Related