filter on columns with an array

I got a problem with one of my filters. My columns is containing an array.

I use {content:“multiComboFilter”} as filter. The content is displayed as a joined String and that is the only value i can pick to retrieve my desired item.

So my item that i want to find got the value [“1”,“2”,“3”] when i set the filter to “2” my item is not listed. My item is only displayed when i select “1”,“2”,“3”.

Hello @bikerboy,
It is possible to set a custom filtering rule in compare property of a filter:

{content:"multiComboFilter", compare:customCompare}

As a filtering function, this method iterates through data and gets the following parameters as arguments:

  • a value that supposed to be a column value,
  • a value of the filter,
  • the entire data item

So you can easily access any data attribute and provide your own logic. Please take a look at the following examples:

  • Code Snippet - partial filtering: filters items if at least one item from the array is selected, if an element from another array is selected, then the first item is not excluded, but both are shown.
  • Code Snippet - strict filtering: filters items by exact match of values

Thank that is helping!