If I understand correctly, the correct use of matcher before v4.0.0 was:
$('#myselect').select2({
...
matcher: function(term, text) {
// return true if matches, false if not
}
})
With 4.0.2 this doesn't work - AFAICT there is only one parameter to matcher
, which is an object. I could use the same function signature and wrap it on oldWrapper
, but I would like to avoid that... I was unable to find any example or docs. So, how do I use the new matcher? Or at least, what is the function signature?