Change default filter of combo editor of the datatable

Hello,

I have a datatable and when I double click in the cell I have a combo that display the list of value.
The default filter is “starting with” but I want to change to “contains”.

How I can change the editor filter function ?
To have:

  filter:function(obj, filter){
    return obj.value.toLowerCase().indexOf(filter.toLowerCase()) != -1;
  }

Regards.

Hello,

You can try to customize filtering of combo suggest via “suggest” property:

{ editor:"combo", options:[...], suggest:{
     filter:function(obj, filter){ 
           return obj.value.toLowerCase().indexOf(filter.toLowerCase()) != -1; 
     }
   },
   ...
},

Thanks a lot.

PS: I have searched more complex solution (e.g. retrieve the editor component, …).