'Datatables Search not working (Medialibrary yajra Laravel)
I had setup datatables to display a users, each user has more images. Datatables column that displays the images is like this:
{data: 'images', render: function ( data, type, row ) {
var out='';
if (type === 'display') {
row.images.forEach(function(item){
out+='<a href="'+item.original_url+'">'+item.file_name+'</a> ';
});}
if (type === 'search') {
row.images.forEach(function(item){
out+=item.file_name+' ';
});}
return out;}
},
All other fields come to the datatables as key:value, while images comes for each user as an array of objects.
All Image File names are displayed correctly in datatables, and links works good also, however general search does not work
I want general search to work with or without search for image file name.
I also specified searchable: false, but still search didn't work, like this:
{data: 'images', render: function ( data, type, row ) {..},searchable: false}
Search works ok without image column!
Any ideas?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
