Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

merged 1 commit into from Mar 11, 2012


Copy link

plaflamme commented Feb 25, 2012

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.

Copy link

samuelclay commented Feb 25, 2012

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?

Copy link
Contributor Author

plaflamme commented Feb 25, 2012

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 added a commit that referenced this pull request Mar 11, 2012
Add an option to prevent matching the returned values in valueMatches
@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
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.