Add an option to prevent matching the returned values in valueMatches #44

merged 1 commit into from Mar 11, 2012


None yet

2 participants


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.


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.

@samuelclay samuelclay merged commit ae97907 into documentcloud:master Mar 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment