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

Not Displaying Correct Suggestions #725

Closed
omar-tariq-dev opened this issue Feb 28, 2014 · 1 comment
Closed

Not Displaying Correct Suggestions #725

omar-tariq-dev opened this issue Feb 28, 2014 · 1 comment

Comments

@omar-tariq-dev
Copy link

NOTE: This may or may not be an issue. I'm just stating an odd behaviour.

STEP 1: Go to this page, the demo page:-
http://twitter.github.io/typeahead.js/examples

STEP 2: Scroll down to 'Multiple Sections with Headers'.

STEP 3: In the search write 'd w' (Yes, these are 3 characters 'd', space and 'w'.). In the suggestions you'll get 'Detroit Red Wings'. Which is correct. Because 'd w' is a valid substring of 'Detroit Red Wings'.

STEP 4: However, if you search 'ed'. Then it doesn't give you the suggestion of 'Detroit Red Wings'. In this case 'ed' is also a valid substring of 'Detroit Red Wings'.

Why is it so?

@jharding
Copy link
Contributor

jharding commented Mar 7, 2014

Right now typeahead.js only matches on prefixes, not substrings. Switching to substrings is something I want to explore down the road though, see #525.

@jharding jharding closed this as completed Mar 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants