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

Unique field? #547

Closed
narrowfail opened this issue Dec 10, 2013 · 5 comments
Closed

Unique field? #547

narrowfail opened this issue Dec 10, 2013 · 5 comments
Milestone

Comments

@narrowfail
Copy link

Hello, I'm pulling this JSON from the server, but when I type John, It only shows one of them. Should any of this values be unique?

[
  {
    "tokens": [
      "john",
      "doe"
    ],
    "city": "Seattle",
    "state": "WA",
    "company": "Company One",
    "thumb_url": "fc4f9c60887cb6b872759a297c48fa37.jpg",
    "type": 2,
    "id": 20492,
    "value": "John Doe"
  },
  {
    "tokens": [
      "david",
      "thompson"
    ],
    "city": "Bordentown",
    "state": "NJ",
    "company": "Company Two",
    "thumb_url": "5f607ab006164fd400f9bc50aa92bb78.jpg",
    "type": 2,
    "id": 29250,
    "value": "John Doe"
  }
]

Thanks!

@paveltyavin
Copy link

Use this commit https://github.com/vinograd19/typeahead.js/commit/6a1a965c807162aeb3b51816fd36d9ee6277e539 and set allowDuplicates to true.

@narrowfail
Copy link
Author

Cool, but what happened to the official development? last activity was 4 month ago, right?

@jharding
Copy link
Contributor

Duplication detection will be configurable in v0.10.

@narrowfail
Copy link
Author

The version of @vinograd19 does not take prefetch into account when the "allow duplicates" feature is on. This means if the result is both in the prefetch and in the query, it will show both.

@jharding
Copy link
Contributor

jharding commented Feb 2, 2014

v0.10 is out and duplicate detection is off by default. It's also possible to configure duplicate detection if it's something you want.

@jharding jharding closed this as completed Feb 2, 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

3 participants