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
merged 1 commit into from Mar 11, 2012

Conversation

Projects
None yet
2 participants
@plaflamme
Contributor

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.

@samuelclay

This comment has been minimized.

Show comment
Hide comment
@samuelclay

samuelclay Feb 25, 2012

Member

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?

Member

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?

@plaflamme

This comment has been minimized.

Show comment
Hide comment
@plaflamme

plaflamme Feb 25, 2012

Contributor

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.

Contributor

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

Merge pull request #44 from plaflamme/preserveMatches
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