mgutbor
mgutbor

Reputation: 113

Apply different group of filters to HTML column with yadcf (datatables)

I have a datatables column created in HTML (image) with this format:

<img src='[path to image]' class='[imgClass]'>

I've created a fiddle to see it in action.

Here is the conditions:

To filter the images on column header, i search for the class and it works ok. But when i press ASSIGNED button on top(to get red, yellow and green ones), the filter doesn't work.

Upvotes: 0

Views: 341

Answers (1)

Daniel
Daniel

Reputation: 37061

You were trying to do a multi select filtering while your filter type was a single select

So you should set your yadcf filter to filter_type: 'multi_select', - see jsfiddle

or even better use select2 with yadcf like this (select2 css/js should be added)

filter_type: 'multi_select', select_type: 'select2',

see jsfiddle

Upvotes: 1

Related Questions