filter on columns with an array

edited August 28 in Technical questions

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".

Tagged:

Comments

  • edited September 1

    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:

  • Thank that is helping!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!