selectFilter on DataTable column with one of "aggregate" options.

I have a column with possible values “A”, “B”, “C”, and “D”.

I’d like to have the column’s select filters choose only one of three possible combinations:

“I” (which is equivalent to choosing to display “A” or “C”)
“II” (which is equivalent to choosing to display “B” or “C”)
“III” (which is equivalent to choosing to display “B” or “D”)

I believe this is possible using the Compare method in the selectFilter

var customCompare (value, filter){
switch (filter) {
case ‘I’:
return ( (value == ‘A’) || (value == ‘C’) );
break;
case ‘II’:
return ( (value == ‘B’) || (value == ‘C’) );
break;
case ‘III’:
return ( (value == ‘B’) || (value == ‘D’) );
break;
}
}

But I don’t know how to only show as possible values “I”, “II”, and “III” in the column header’s selectFilter. (like an options Method). Is this possible in a header’s built-in filter?

It is possible ( a bit verbose though )

You can define options directly in config of selectFilter. Such options will be used only in the filter itself and will not affect the column rendering

webix.ui({
  rows:[
    { view:"datatable", columns:[{
      	id:"year", header:{
          content:"selectFilter", options:[
            { id:"1994", value:"1" },
            { id:"1964", value:"2" },
            { id:"1966", value:"3" }
          ]}
      }],
      data:grid_data }
  ]
});

http://webix.com/snippet/448f28e8

Thank you!