My server is returning only the subset of values that match the search term. Furthermore, I want the match to occur on more that just the begining of the work (matches anywhere). So I don't want the callback to filter the matches for me.
This change allows passing an 'preserveMatches' option to the valueMatches callback. It prevents the callback from filtering the matches.
Added 'preserveMatches' to prevent matching facet values against sear…
Great idea. I'd prefer to have the option be explicit about the filtering behavior rather than the "preservation" behavior. It can be defaulted to true, so maybe filterMatches? But just to confirm, you're already filtering server side, right?
I chose 'preserveMatches' because of the other option called 'preserveOrder', but any naming scheme is fine with me.
And yes, in my case, the values of a category are coming from the server and are already filtered to match the partial term.